Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1329)

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 16465005: Fix dcheck in ContentBrowserTestSanityTest.SingleProcess in win aura. The problem was that GpuProce… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/test/content_browser_test_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
===================================================================
--- content/browser/gpu/gpu_process_host.cc (revision 204541)
+++ content/browser/gpu/gpu_process_host.cc (working copy)
@@ -517,12 +517,22 @@
}
}
- int exit_code;
- base::TerminationStatus status = process_->GetTerminationStatus(&exit_code);
- UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessTerminationStatus",
- status,
- base::TERMINATION_STATUS_MAX_ENUM);
+ // In case we never started, clean up.
+ while (!queued_messages_.empty()) {
+ delete queued_messages_.front();
+ queued_messages_.pop();
+ }
+ // This is only called on the IO thread so no race against the constructor
+ // for another GpuProcessHost.
+ if (g_gpu_process_hosts[kind_] == this)
+ g_gpu_process_hosts[kind_] = NULL;
+
+ // If there are any remaining offscreen contexts at the point the
+ // GPU process exits, assume something went wrong, and block their
+ // URLs from accessing client 3D APIs without prompting.
+ BlockLiveOffscreenContexts();
+
UMA_HISTOGRAM_COUNTS_100("GPU.AtExitSurfaceCount",
GpuSurfaceTracker::Get()->GetSurfaceCount());
UMA_HISTOGRAM_BOOLEAN("GPU.AtExitReceivedMemoryStats",
@@ -544,47 +554,39 @@
uma_memory_stats_.bytes_limit / 1024 / 1024, 1, 2000, 50);
}
- if (status == base::TERMINATION_STATUS_NORMAL_TERMINATION ||
- status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION) {
- UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessExitCode",
- exit_code,
- RESULT_CODE_LAST_CODE);
- }
+ std::string message;
+ if (!in_process_) {
+ int exit_code;
+ base::TerminationStatus status = process_->GetTerminationStatus(&exit_code);
+ UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessTerminationStatus",
+ status,
+ base::TERMINATION_STATUS_MAX_ENUM);
- // In case we never started, clean up.
- while (!queued_messages_.empty()) {
- delete queued_messages_.front();
- queued_messages_.pop();
- }
+ if (status == base::TERMINATION_STATUS_NORMAL_TERMINATION ||
+ status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION) {
+ UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessExitCode",
+ exit_code,
+ RESULT_CODE_LAST_CODE);
+ }
- // This is only called on the IO thread so no race against the constructor
- // for another GpuProcessHost.
- if (g_gpu_process_hosts[kind_] == this)
- g_gpu_process_hosts[kind_] = NULL;
-
- // If there are any remaining offscreen contexts at the point the
- // GPU process exits, assume something went wrong, and block their
- // URLs from accessing client 3D APIs without prompting.
- BlockLiveOffscreenContexts();
-
- std::string message;
- switch (status) {
- case base::TERMINATION_STATUS_NORMAL_TERMINATION:
- message = "The GPU process exited normally. Everything is okay.";
- break;
- case base::TERMINATION_STATUS_ABNORMAL_TERMINATION:
- message = base::StringPrintf(
- "The GPU process exited with code %d.",
- exit_code);
- break;
- case base::TERMINATION_STATUS_PROCESS_WAS_KILLED:
- message = "You killed the GPU process! Why?";
- break;
- case base::TERMINATION_STATUS_PROCESS_CRASHED:
- message = "The GPU process crashed!";
- break;
- default:
- break;
+ switch (status) {
+ case base::TERMINATION_STATUS_NORMAL_TERMINATION:
+ message = "The GPU process exited normally. Everything is okay.";
+ break;
+ case base::TERMINATION_STATUS_ABNORMAL_TERMINATION:
+ message = base::StringPrintf(
+ "The GPU process exited with code %d.",
+ exit_code);
+ break;
+ case base::TERMINATION_STATUS_PROCESS_WAS_KILLED:
+ message = "You killed the GPU process! Why?";
+ break;
+ case base::TERMINATION_STATUS_PROCESS_CRASHED:
+ message = "The GPU process crashed!";
+ break;
+ default:
+ break;
+ }
}
BrowserThread::PostTask(BrowserThread::UI,
« no previous file with comments | « no previous file | content/test/content_browser_test_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698