summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 00:27:11 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 00:27:11 +0000
commitcd5241ff75071da8e4345e81ebc220e17505a306 (patch)
treee7fc505124d9a6bb2a74b18ac32d17df5ac0bd2a
parentf20dac42c398c437ff65c79c9a5610bd8e04af91 (diff)
downloadchromium_src-cd5241ff75071da8e4345e81ebc220e17505a306.zip
chromium_src-cd5241ff75071da8e4345e81ebc220e17505a306.tar.gz
chromium_src-cd5241ff75071da8e4345e81ebc220e17505a306.tar.bz2
Adds exitcodes for the TerminateProcess calls on hung renderers. There are still plenty of TerminateProcess(..., 0) calls, but these are the ones I know.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/render_process_host.cc2
-rw-r--r--chrome/browser/render_view_host.cc3
-rw-r--r--chrome/browser/views/hung_renderer_view.cc3
3 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/render_process_host.cc b/chrome/browser/render_process_host.cc
index 2520651..feb1e32 100644
--- a/chrome/browser/render_process_host.cc
+++ b/chrome/browser/render_process_host.cc
@@ -509,7 +509,7 @@ bool RenderProcessHost::FastShutdownIfPossible() {
}
// Otherwise, call TerminateProcess. Using exit code 0 means that UMA won't
// treat this as a renderer crash.
- ::TerminateProcess(proc, 0);
+ ::TerminateProcess(proc, ResultCodes::NORMAL_EXIT);
return true;
}
diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc
index 156db86..7fe7e4e 100644
--- a/chrome/browser/render_view_host.cc
+++ b/chrome/browser/render_view_host.cc
@@ -33,6 +33,7 @@
#include <vector>
#include "base/string_util.h"
+#include "chrome/app/result_codes.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/cross_site_request_manager.h"
#include "chrome/browser/navigation_entry.h"
@@ -1190,7 +1191,7 @@ void RenderViewHost::NotifyRendererUnresponsive() {
// If the tab hangs in the beforeunload/unload handler there's really
// nothing we can do to recover. We can safely kill the process and the
// Browser will deal with the crash appropriately.
- TerminateProcess(process()->process(), 0);
+ TerminateProcess(process()->process(), ResultCodes::HUNG);
return;
}
diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc
index 2434118..b121b00 100644
--- a/chrome/browser/views/hung_renderer_view.cc
+++ b/chrome/browser/views/hung_renderer_view.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/views/hung_renderer_view.h"
+#include "chrome/app/result_codes.h"
#include "chrome/app/theme/theme_resources.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/render_view_host.h"
@@ -333,7 +334,7 @@ void HungRendererWarningView::ButtonPressed(
if (sender == kill_button_) {
// Kill the process.
HANDLE process = contents_->process()->process();
- TerminateProcess(process, 0);
+ TerminateProcess(process, ResultCodes::HUNG);
}
}