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:
@ -71,13 +71,13 @@ class CefMainRunner : public CefMainRunnerHandler {
|
||||
// Called on the UI thread after the context is initialized.
|
||||
void OnContextInitialized(base::OnceClosure context_initialized);
|
||||
|
||||
// Performs shutdown actions that need to occur on the UI thread before any
|
||||
// threads are destroyed.
|
||||
void FinishShutdownOnUIThread(base::OnceClosure shutdown_on_ui_thread,
|
||||
base::WaitableEvent* uithread_shutdown_event);
|
||||
// Performs shutdown actions that need to occur on the UI thread before the
|
||||
// thread RunLoop has stopped.
|
||||
void StartShutdownOnUIThread(base::OnceClosure shutdown_on_ui_thread);
|
||||
|
||||
// Destroys the runtime and related objects.
|
||||
void FinalizeShutdown(base::OnceClosure finalize_shutdown);
|
||||
// Performs shutdown actions that need to occur on the UI thread after the
|
||||
// thread RunLoop has stopped and before running exit callbacks.
|
||||
void FinishShutdownOnUIThread();
|
||||
|
||||
const bool multi_threaded_message_loop_;
|
||||
const bool external_message_pump_;
|
||||
|
Reference in New Issue
Block a user