summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gpu_process_host.cc
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 11:09:52 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 11:09:52 +0000
commit9876476a3a3d99ab52a7705d3038363b7eab30fb (patch)
treed24f174e1361668a6aedbf688a5d36aa7a5ca899 /chrome/browser/gpu_process_host.cc
parent03eb8e9122528a2c35da2c3d0bc2694918f8b574 (diff)
downloadchromium_src-9876476a3a3d99ab52a7705d3038363b7eab30fb.zip
chromium_src-9876476a3a3d99ab52a7705d3038363b7eab30fb.tar.gz
chromium_src-9876476a3a3d99ab52a7705d3038363b7eab30fb.tar.bz2
Revert 61718 - GPU process terminates on hang.
I added a watchdog thread that intermitently checks the main thread can respond to tasks posted on its message queue. I fixed some bugs that preventede GGL from failing when the GPU channel was lost. Added a command line swith to disable the watchdog thread for debugging purposes. TEST=try, check WebGL works, check about:gpuhang terminates process. BUG=38739,53871 Review URL: http://codereview.chromium.org/3528012 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/3616011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61782 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gpu_process_host.cc')
-rw-r--r--chrome/browser/gpu_process_host.cc25
1 files changed, 4 insertions, 21 deletions
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc
index 3825c2f..8e2242e 100644
--- a/chrome/browser/gpu_process_host.cc
+++ b/chrome/browser/gpu_process_host.cc
@@ -91,7 +91,6 @@ bool GpuProcessHost::Init() {
// Propagate relevant command line switches.
static const char* const kSwitchNames[] = {
switches::kUseGL,
- switches::kDisableGpuWatchdog,
switches::kDisableLogging,
switches::kEnableLogging,
switches::kGpuStartupDialog,
@@ -123,18 +122,14 @@ GpuProcessHost* GpuProcessHost::Get() {
return sole_instance_;
}
+// static
void GpuProcessHost::SendAboutGpuCrash() {
- ChromeThread::PostTask(
- ChromeThread::IO,
- FROM_HERE,
- NewRunnableFunction(&GpuProcessHost::SendAboutGpuCrashInternal));
+ Get()->Send(new GpuMsg_Crash());
}
+// static
void GpuProcessHost::SendAboutGpuHang() {
- ChromeThread::PostTask(
- ChromeThread::IO,
- FROM_HERE,
- NewRunnableFunction(&GpuProcessHost::SendAboutGpuHangInternal));
+ Get()->Send(new GpuMsg_Hang());
}
bool GpuProcessHost::Send(IPC::Message* msg) {
@@ -353,15 +348,3 @@ URLRequestContext* GpuProcessHost::GetRequestContext(
bool GpuProcessHost::CanShutdown() {
return true;
}
-
-// static
-void GpuProcessHost::SendAboutGpuCrashInternal() {
- DCHECK(Get());
- Get()->Send(new GpuMsg_Crash());
-}
-
-// static
-void GpuProcessHost::SendAboutGpuHangInternal() {
- DCHECK(Get());
- Get()->Send(new GpuMsg_Hang());
-}