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

Unified Diff: Source/wtf/Assertions.h

Issue 683043002: PartitionAlloc: Distinguish OOMs where a lot of super pages are not committed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: IMMEDIATE_CRASH_WITH_FLAG. Created 6 years, 1 month 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 | Source/wtf/PartitionAlloc.h » ('j') | Source/wtf/PartitionAlloc.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Assertions.h
diff --git a/Source/wtf/Assertions.h b/Source/wtf/Assertions.h
index 5e5dd68b47895ba71002cb204e72d211a073d113..d1aaca1b181fe47d759612df19b3972574cc17d4 100644
--- a/Source/wtf/Assertions.h
+++ b/Source/wtf/Assertions.h
@@ -134,6 +134,15 @@ using WTF::FrameToNameScope;
#endif
#endif
+// IMMEDIATE_CRASH_WITH_FLAG() - Like IMMEDIATE_CRASH() above but try to crash at a specified address to be distinguished in crash reports.
+#ifndef IMMEDIATE_CRASH_WITH_FLAG
+#if COMPILER(GCC)
+#define IMMEDIATE_CRASH_WITH_FLAG(FLAG) IMMEDIATE_CRASH()
+#else
+#define IMMEDIATE_CRASH_WITH_FLAG(FLAG) (((void(*)())((FLAG) & 0xfff))(), IMMEDIATE_CRASH())
+#endif
+#endif
+
/* CRASH() - Raises a fatal error resulting in program termination and triggering either the debugger or the crash reporter.
Use CRASH() in response to known, unrecoverable errors like out-of-memory.
« no previous file with comments | « no previous file | Source/wtf/PartitionAlloc.h » ('j') | Source/wtf/PartitionAlloc.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698