Fix shutdown crash in VsyncBridgeChild when the GPU process is enabled. (bug 1314816, r=mattwoodrow)

This commit is contained in:
David Anderson
2016-11-02 16:45:38 -07:00
parent 50f0f316fd
commit 1cfa631b64
2 changed files with 11 additions and 2 deletions

View File

@@ -397,7 +397,10 @@ GPUProcessManager::DestroyProcess()
mProcessToken = 0; mProcessToken = 0;
mProcess = nullptr; mProcess = nullptr;
mGPUChild = nullptr; mGPUChild = nullptr;
if (mVsyncBridge) {
mVsyncBridge->Close();
mVsyncBridge = nullptr; mVsyncBridge = nullptr;
}
} }
RefPtr<CompositorSession> RefPtr<CompositorSession>

View File

@@ -114,8 +114,14 @@ VsyncBridgeChild::Close()
if (!mProcessToken) { if (!mProcessToken) {
return; return;
} }
PVsyncBridgeChild::Close();
// Clear the process token so we don't notify the GPUProcessManager. It already
// knows we're closed since it manually called Close, and in fact the GPM could
// have already been destroyed during shutdown.
mProcessToken = 0; mProcessToken = 0;
// Close the underlying IPC channel.
PVsyncBridgeChild::Close();
} }
void void