obs-browser
obs-browser copied to clipboard
Remove ExecuteOnBrowser wrapper on destroy
Description
Remove ExecuteOnBrowser() wrapper from BrowserSource::DestroyBrowser().
Motivation and Context
Under certain conditions, when browser source scene items are removed in a loop, CEF UI thread may hang waiting for previous invocations of ExecuteOnBrowser() to complete resulting in a deadlock.
Since CefBrowserHost::WasHidden() and CefBrowserHost::CloseBrowser() are not required to be called on a certain thread, removing ExecuteOnBrowser() altogether preserves the functionality, eliminates the deadlock and simplifies the code.
How Has This Been Tested?
- Remove single browser source
- Remove multiple browser sources
- Change scene collection
- Hide/showbrowser source with "Shutdown when hidden" checked
- Exit program
Types of changes
- Bug fix (non-breaking change which fixes an issue)
- Code cleanup (non-breaking change which makes code smaller or more readable)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.