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

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

Issue 2810763002: gpu: Do not relaunch the process during teardown. (Closed)
Patch Set: 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 | « no previous file | 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 16b1f0db35a5dbd3295720daeddaf209207af1e0..82875a87b2bfa051a02cae96e936221b22197129 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;
sadrul 2017/04/10 15:18:00 Note that this is running on the IO thread. The fl
piman 2017/04/10 17:14:32 Isn't this a data race, anyway?
sadrul 2017/04/10 17:51:50 In the case when it's not terminating (i.e. in mos
+
static int last_host_id = 0;
int host_id;
host_id = ++last_host_id;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698