mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Split UI thread shutdown into before and after stages (see #3609)
Existing UI thread shutdown tasks need to be executed before the UI thread RunLoop is terminated. Those tasks have now been moved to CefMainRunner::StartShutdownOnUIThread and FinishShutdownOnUIThread is now called after the RunLoop is terminated. This fixes a shutdown crash in ChromeProcessSingleton::DeleteInstance. DeleteInstance needs to be called on the UI thread near the end of the shutdown process (after ChromeProcessSingleton::Cleanup is called via PostMainMessageLoopRun).
This commit is contained in:
@@ -37,6 +37,7 @@ class ChromeMainRunnerDelegate : public CefMainRunnerDelegate {
|
||||
void BeforeMainMessageLoopRun(base::RunLoop* run_loop) override;
|
||||
bool HandleMainMessageLoopQuit() override;
|
||||
void BeforeUIThreadInitialize() override;
|
||||
void BeforeUIThreadShutdown() override;
|
||||
void AfterUIThreadShutdown() override;
|
||||
void BeforeExecuteProcess(const CefMainArgs& args) override;
|
||||
void AfterExecuteProcess() override;
|
||||
@@ -50,6 +51,8 @@ class ChromeMainRunnerDelegate : public CefMainRunnerDelegate {
|
||||
CefMainRunnerHandler* const runner_;
|
||||
CefSettings* const settings_;
|
||||
CefRefPtr<CefApp> application_;
|
||||
|
||||
bool multi_threaded_message_loop_ = false;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_COMMON_CHROME_CHROME_MAIN_RUNNER_DELEGATE_CEF_
|
||||
|
Reference in New Issue
Block a user