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 790be48aa6
commit ec7cac2aa1
2 changed files with 11 additions and 2 deletions

View File

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

View File

@ -114,8 +114,14 @@ VsyncBridgeChild::Close()
if (!mProcessToken) {
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;
// Close the underlying IPC channel.
PVsyncBridgeChild::Close();
}
void