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

Unified Diff: content/renderer/render_view_impl.cc

Issue 9380026: Add a stackframe named 'CrashIntentionally' to crashes from about:crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a comment to base on how to use NOINLINE Created 8 years, 10 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
« base/compiler_specific.h ('K') | « base/compiler_specific.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 8240f49de3b66596a0ec355c47159fbed7828e8f..f4af5933df7673f9cfdcb8e6b77f8acbe189f52a 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -325,18 +325,18 @@ static WebReferrerPolicy getReferrerPolicyFromRequest(
WebKit::WebReferrerPolicyDefault;
}
+NOINLINE static void CrashIntentionally() {
Nico 2012/02/10 22:54:57 http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax
+ // 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;
+}
+
static void MaybeHandleDebugURL(const GURL& url) {
if (!url.SchemeIs(chrome::kChromeUIScheme))
return;
if (url == GURL(chrome::kChromeUICrashURL)) {
- // 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.
- NOTREACHED();
+ CrashIntentionally();
} else if (url == GURL(chrome::kChromeUIKillURL)) {
base::KillProcess(base::GetCurrentProcessHandle(), 1, false);
} else if (url == GURL(chrome::kChromeUIHangURL)) {
« base/compiler_specific.h ('K') | « base/compiler_specific.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698