Chromium Code Reviews| 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; |