Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5503)

Unified Diff: chrome/renderer/about_handler.cc

Issue 7301003: Make AboutCrash handler crash directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oops, and volatile to prevent optimizing undefined behavior. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/about_handler.cc
diff --git a/chrome/renderer/about_handler.cc b/chrome/renderer/about_handler.cc
index de4b57aec325cee746287023d30194ab38c5bc45..c8e16042795cde6387db9b2f38292f4242a5929e 100644
--- a/chrome/renderer/about_handler.cc
+++ b/chrome/renderer/about_handler.cc
@@ -43,7 +43,14 @@ bool AboutHandler::MaybeHandle(const GURL& url) {
// static
void AboutHandler::AboutCrash() {
- CHECK(false);
+ // NOTE(shess): Crash directly rather than using NOTREACHED() so
+ // that the signature is easier to triage in crash reports.
+ volatile int* zero = NULL;
+ *zero = 0;
+
+ // Just in case the compiler decides the above is undefined and
+ // optimizes it away.
Nico 2011/07/03 19:34:37 I don't think that can happen with a volatile poin
+ NOTREACHED();
}
// static
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698