summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/about_handler.cc7
-rw-r--r--chrome/renderer/about_handler.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/chrome/renderer/about_handler.cc b/chrome/renderer/about_handler.cc
index f53302b..e748aa1 100644
--- a/chrome/renderer/about_handler.cc
+++ b/chrome/renderer/about_handler.cc
@@ -4,6 +4,7 @@
#include "chrome/renderer/about_handler.h"
+#include "base/process_util.h"
#include "base/threading/platform_thread.h"
#include "chrome/common/about_handler.h"
#include "googleurl/src/gurl.h"
@@ -14,6 +15,7 @@ typedef void (*AboutHandlerFuncPtr)();
// chrome/common/about_handler.cc.
static const AboutHandlerFuncPtr about_urls_handlers[] = {
AboutHandler::AboutCrash,
+ AboutHandler::AboutKill,
AboutHandler::AboutHang,
AboutHandler::AboutShortHang,
NULL,
@@ -44,6 +46,11 @@ void AboutHandler::AboutCrash() {
}
// static
+void AboutHandler::AboutKill() {
+ base::KillProcess(base::GetCurrentProcessHandle(), 1, false);
+}
+
+// static
void AboutHandler::AboutHang() {
for (;;) {
base::PlatformThread::Sleep(1000);
diff --git a/chrome/renderer/about_handler.h b/chrome/renderer/about_handler.h
index ee55f49..dea3c5b 100644
--- a/chrome/renderer/about_handler.h
+++ b/chrome/renderer/about_handler.h
@@ -24,6 +24,9 @@ class AboutHandler {
// Induces a renderer crash.
static void AboutCrash();
+ // Induces a renderer kill.
+ static void AboutKill();
+
// Induces a renderer hang.
static void AboutHang();