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:
Randall Barker 2017-08-31 14:26:46 -07:00
parent 5c31c8a30b
commit 000c7b874b
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -198,7 +198,7 @@ UiCompositorControllerChild::Destroy()
NewRunnableMethod("layers::UiCompositorControllerChild::Destroy",
this,
&UiCompositorControllerChild::Destroy),
nsIThread::DISPATCH_NORMAL);
nsIThread::DISPATCH_SYNC);
return;
}