Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log error if CefInitialize fails #477

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tt2468
Copy link
Member

@tt2468 tt2468 commented Feb 19, 2025

Description

If CefInitialize() fails, blogs an error so that people who actually pay attention to logs can understand why browser sources are not working.

More work should be done to fully lock out the plugin if CefInitialize fails. Such behavior is required according to the CEF documentation.

See the CEF cef_resultcode_t enum for the definition of the exit codes.

Motivation and Context

So it turns out CefInitialize is a boolean return... Anyway, let's log failures so that we can at least begin to track them down. This change also returns early, but that does not make any of what we're doing any safer. Returning early currently only has the effect of safely disabling browser panels.

How Has This Been Tested?

Compiles, and OBS doesn't immediately crash.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

So it turns out CefInitialize is a boolean return... Anyway, let's log
failures so that we can at least begin to track them down. This change
also returns early, but that does not make any of what we're doing any
safer. Returning early currently only has the effect of safely
disabling browser panels.

More work should be done to fully lock out the plugin if CefInitialize
fails. Such behavior is required according to the CEF documentation.

See the CEF cef_resultcode_t enum for the definition of the exit codes.
@WizardCM WizardCM added the Enhancement New feature or improvement label Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants