Bug 1316988: Change the wording of the error message. r?rhunt draft
authorMilan Sreckovic <milan@mozilla.com>
Fri, 11 Nov 2016 17:51:25 -0500
changeset 437949 9afb32a3fc9eb4b1534dce745feb7dd18e8a0a38
parent 437948 fc104971a4db41e38808e6412bc32e1900172f14
child 536765 8b0215373a3885258d30b36420e23c13ab56b593
push id35555
push usermsreckovic@mozilla.com
push dateFri, 11 Nov 2016 22:52:24 +0000
reviewersrhunt
bugs1316988
milestone52.0a1
Bug 1316988: Change the wording of the error message. r?rhunt MozReview-Commit-ID: GB1sF1APkBJ
gfx/ipc/GPUProcessManager.cpp
--- a/gfx/ipc/GPUProcessManager.cpp
+++ b/gfx/ipc/GPUProcessManager.cpp
@@ -227,17 +227,17 @@ GPUProcessManager::EnsureVRManager()
 }
 
 void
 GPUProcessManager::OnProcessLaunchComplete(GPUProcessHost* aHost)
 {
   MOZ_ASSERT(mProcess && mProcess == aHost);
 
   if (!mProcess->IsConnected()) {
-    DisableGPUProcess("Failed to launch GPU process");
+    DisableGPUProcess("Failed to connect GPU process");
     return;
   }
 
   mGPUChild = mProcess->GetActor();
   mProcessToken = mProcess->GetProcessToken();
 
   Endpoint<PVsyncBridgeParent> vsyncParent;
   Endpoint<PVsyncBridgeChild> vsyncChild;
@@ -316,17 +316,20 @@ GPUProcessManager::OnProcessDeviceReset(
 void
 GPUProcessManager::OnProcessUnexpectedShutdown(GPUProcessHost* aHost)
 {
   MOZ_ASSERT(mProcess && mProcess == aHost);
 
   DestroyProcess();
 
   if (mNumProcessAttempts > uint32_t(gfxPrefs::GPUProcessDevMaxRestarts())) {
-    DisableGPUProcess("GPU processed crashed too many times");
+    char disableMessage[64];
+    SprintfLiteral(disableMessage, "GPU process disabled after %d attempts",
+                   mNumProcessAttempts);
+    DisableGPUProcess(disableMessage);
   }
 
   HandleProcessLost();
 }
 
 void
 GPUProcessManager::HandleProcessLost()
 {