mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 1392705 - part 1: Make UiCompositorControllerChild::Destroy synchronous r=dvander
Ensure the UiCompositorControllerChild is shutdown in the UI thread before the compositor thread is shutdown by the main thread. MozReview-Commit-ID: 4hXYxSi9tzz --HG-- extra : rebase_source : fd265b39986f453ea9ab59c60bb80319b74e8f9c
This commit is contained in:
parent
5c31c8a30b
commit
000c7b874b
@ -92,16 +92,16 @@ InProcessCompositorSession::Shutdown()
|
||||
// at which point CBP will defer a Release on the compositor thread. We
|
||||
// can safely release our reference now, and let the destructor run on either
|
||||
// thread.
|
||||
mCompositorBridgeChild->Destroy();
|
||||
mCompositorBridgeChild = nullptr;
|
||||
mCompositorBridgeParent = nullptr;
|
||||
mCompositorWidget = nullptr;
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
if (mUiCompositorControllerChild) {
|
||||
mUiCompositorControllerChild->Destroy();
|
||||
mUiCompositorControllerChild = nullptr;
|
||||
}
|
||||
#endif //defined(MOZ_WIDGET_ANDROID)
|
||||
mCompositorBridgeChild->Destroy();
|
||||
mCompositorBridgeChild = nullptr;
|
||||
mCompositorBridgeParent = nullptr;
|
||||
mCompositorWidget = nullptr;
|
||||
GPUProcessManager::Get()->UnregisterInProcessSession(this);
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ UiCompositorControllerChild::Destroy()
|
||||
NewRunnableMethod("layers::UiCompositorControllerChild::Destroy",
|
||||
this,
|
||||
&UiCompositorControllerChild::Destroy),
|
||||
nsIThread::DISPATCH_NORMAL);
|
||||
nsIThread::DISPATCH_SYNC);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user