summaryrefslogtreecommitdiffstats
path: root/content/gpu
diff options
context:
space:
mode:
authorjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-08 04:52:46 +0000
committerjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-08 04:52:46 +0000
commitf330b76298ce76aa490c787dc10b5d018ab1d6e5 (patch)
tree2b4988a31437983ede37110e02d1032c0eb027b9 /content/gpu
parent8f1a8b337a5d6d41eddc739028703d23088906cc (diff)
downloadchromium_src-f330b76298ce76aa490c787dc10b5d018ab1d6e5.zip
chromium_src-f330b76298ce76aa490c787dc10b5d018ab1d6e5.tar.gz
chromium_src-f330b76298ce76aa490c787dc10b5d018ab1d6e5.tar.bz2
Linux Sandbox: Stop GPU watchdog in accountable way.
The Linux sandbox can sometimes detect a spurious running thread if it has just been stopped. We add a new LinuxSandbox::StopThread() method to safely stop threads and make sure they won't be counted as still running. BUG=328620 NOTRY=true Review URL: https://codereview.chromium.org/147203005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu')
-rw-r--r--content/gpu/gpu_main.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index fdc7de4..8176221 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -409,13 +409,17 @@ bool StartSandboxLinux(const gpu::GPUInfo& gpu_info,
WarmUpSandboxNvidia(gpu_info, should_initialize_gl_context);
- if (watchdog_thread)
- watchdog_thread->Stop();
+ if (watchdog_thread) {
+ // LinuxSandbox needs to be able to ensure that the thread
+ // has really been stopped.
+ LinuxSandbox::StopThread(watchdog_thread);
+ }
// LinuxSandbox::InitializeSandbox() must always be called
// with only one thread.
res = LinuxSandbox::InitializeSandbox();
- if (watchdog_thread)
+ if (watchdog_thread) {
watchdog_thread->Start();
+ }
return res;
}