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

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

Issue 2810763002: gpu: Do not relaunch the process during teardown. (Closed)
Patch Set: AtomicFlag Created 3 years, 8 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 | « content/browser/browser_main_runner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 7aec4ef6a28854661773fd50d952d8804f95ca69..e03b045e0eee07e16141d7d3daeb2882e9d48084 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -369,6 +369,10 @@ GpuProcessHost* GpuProcessHost::Get(GpuProcessKind kind, bool force_create) {
if (!force_create)
return nullptr;
+ // Do not create a new process if browser is shutting down.
+ if (BrowserMainRunner::ExitedMainMessageLoop())
+ return nullptr;
+
static int last_host_id = 0;
int host_id;
host_id = ++last_host_id;
« no previous file with comments | « content/browser/browser_main_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698