Skip to content

fix(libSceWebBrowserDialog): return error codes instead of throwing in initialize and terminate - #5715

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
ErenYeager1836:fix/web-browser-dialog-error-codes
Oct 15, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
ErenYeager1836:fix/web-browser-dialog-error-codes

Conversation

@ErenYeager1836

Copy link
Copy Markdown
Contributor

What

sceWebBrowserDialogInitialize previously threw std::logic_error if already initialized, and sceWebBrowserDialogTerminate previously threw if called when uninitialized. In common dialogs, these conditions should return error codes instead of throwing exceptions:

  • sceWebBrowserDialogInitialize returns 0x80B80004 (COMMON_DIALOG_ERROR_ALREADY_INITIALIZED) when already initialized.
  • sceWebBrowserDialogTerminate returns 0x80B80003 (COMMON_DIALOG_ERROR_NOT_INITIALIZED) when uninitialized, and COMMON_DIALOG_ERROR_BUSY when not in a terminable state.

Also removes unused <stdexcept> include and updates GuestWebBrowserDialog guest tests to verify these error code returns.

Tested

  • python tools/check_conventions.py --base upstream/main passed.
  • python tools/check_test_registration.py passed (707 test executables).
  • Verified zero file overlap across all open pull requests.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
#6044 core/libs/tests/GuestWebBrowserDialog.cpp

@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the new return codes (0x80B80004 already initialized, 0x80B80003 not initialized) against shadPS4's commondialog.h and its Initialize/Terminate; they match. guest_web_browser_dialog passes and fails when Export.cpp is reverted; scoped build and ctest green, no conflict with #6092. Merging.

@adriadam10
adriadam10 merged commit e534fd9 into boykopovar:main Oct 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants