Bug 1380655: Look for the timeout and terminate GPU process only when we have a separate GPU process, not also when the browser is acting as one. r?dvander
MozReview-Commit-ID: Fp4Dv5SArjX
--- a/gfx/layers/ipc/CompositorManagerChild.cpp
+++ b/gfx/layers/ipc/CompositorManagerChild.cpp
@@ -253,27 +253,30 @@ CompositorManagerChild::GetSpecificMessa
}
void
CompositorManagerChild::SetReplyTimeout()
{
#ifndef DEBUG
// Add a timeout for release builds to kill GPU process when it hangs.
// Don't apply timeout when using web render as it tend to timeout frequently.
- if (XRE_IsParentProcess() && !gfxVars::UseWebRender()) {
+ if (XRE_IsParentProcess() &&
+ GPUProcessManager::Get()->GetGPUChild() &&
+ !gfxVars::UseWebRender()) {
int32_t timeout = gfxPrefs::GPUProcessIPCReplyTimeoutMs();
SetReplyTimeoutMs(timeout);
}
#endif
}
bool
CompositorManagerChild::ShouldContinueFromReplyTimeout()
{
if (XRE_IsParentProcess()) {
gfxCriticalNote << "Killing GPU process due to IPC reply timeout";
+ MOZ_DIAGNOSTIC_ASSERT(GPUProcessManager::Get()->GetGPUChild());
GPUProcessManager::Get()->KillProcess();
}
return false;
}
} // namespace layers
} // namespace mozilla