diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 23:06:49 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 23:06:49 +0000 |
commit | dd576af62d44b9aaaefedbfe78822f6c83e4f310 (patch) | |
tree | 204f6827182bb0ec4c37b8bf93ef0a96879fc43a /chrome/browser | |
parent | 1cea23942dddeeb854a0f8120812e87b5c962d34 (diff) | |
download | chromium_src-dd576af62d44b9aaaefedbfe78822f6c83e4f310.zip chromium_src-dd576af62d44b9aaaefedbfe78822f6c83e4f310.tar.gz chromium_src-dd576af62d44b9aaaefedbfe78822f6c83e4f310.tar.bz2 |
Add about:gpuhang
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/3447023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60373 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 8 | ||||
-rw-r--r-- | chrome/browser/gpu_process_host.cc | 5 | ||||
-rw-r--r-- | chrome/browser/gpu_process_host.h | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 4406a31..69ad244 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -271,7 +271,7 @@ std::string AboutAbout() { html.append(kAllAboutPaths[i]); html.append("</a>\n"); } - const char *debug[] = { "crash", "hang", "shorthang", "gpucrash" }; + const char *debug[] = { "crash", "hang", "shorthang", "gpucrash", "gpuhang" }; html.append("</ul><h2>For Debug</h2>"); html.append("</ul><p>The following pages are for debugging purposes only. " "Because they crash or hang the renderer, they're not linked " @@ -1160,11 +1160,15 @@ bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) { return true; } - // Handle URL to crash the gpu process. + // Handle URLs to wreck the gpu process. if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuCrashURL)) { GpuProcessHost::SendAboutGpuCrash(); return true; } + if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuHangURL)) { + GpuProcessHost::SendAboutGpuHang(); + return true; + } // There are a few about: URLs that we hand over to the renderer. If the // renderer wants them, don't do any rewriting. diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc index f2bba1f..f4c6164 100644 --- a/chrome/browser/gpu_process_host.cc +++ b/chrome/browser/gpu_process_host.cc @@ -127,6 +127,11 @@ void GpuProcessHost::SendAboutGpuCrash() { Get()->Send(new GpuMsg_Crash()); } +// static +void GpuProcessHost::SendAboutGpuHang() { + Get()->Send(new GpuMsg_Hang()); +} + bool GpuProcessHost::Send(IPC::Message* msg) { if (!EnsureInitialized()) return false; diff --git a/chrome/browser/gpu_process_host.h b/chrome/browser/gpu_process_host.h index d885408..e4d4559 100644 --- a/chrome/browser/gpu_process_host.h +++ b/chrome/browser/gpu_process_host.h @@ -31,6 +31,10 @@ class GpuProcessHost : public BrowserChildProcessHost { // Tells the GPU process to crash. Useful for testing. static void SendAboutGpuCrash(); + // Tells the GPU process to let its main thread enter an infinite loop. + // Useful for testing. + static void SendAboutGpuHang(); + // Shutdown routine, which should only be called upon process // termination. static void Shutdown(); |