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

Unified Diff: third_party/WebKit/Source/wtf/AssertionsTest.cpp

Issue 2288473002: Implement Dump-on-DCHECK (via a new LogSeverity). (Closed)
Patch Set: Pull the Official Windows build default in, and rebase Created 3 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
« no previous file with comments | « third_party/WebKit/Source/wtf/Assertions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/AssertionsTest.cpp
diff --git a/third_party/WebKit/Source/wtf/AssertionsTest.cpp b/third_party/WebKit/Source/wtf/AssertionsTest.cpp
index a15d47cbec802efe12c66c568fa546eaac3c5559..bb4a3ee7d2237fdd73f5a942fe53594ad932b0fb 100644
--- a/third_party/WebKit/Source/wtf/AssertionsTest.cpp
+++ b/third_party/WebKit/Source/wtf/AssertionsTest.cpp
@@ -12,9 +12,14 @@ namespace WTF {
TEST(AssertionsTest, Assertions) {
ASSERT(true);
-#if DCHECK_IS_ON()
+#if DCHECK_IS_ON() && !defined(DCHECK_IS_DUMP_WITHOUT_CRASH)
EXPECT_DEATH_IF_SUPPORTED(ASSERT(false), "");
EXPECT_DEATH_IF_SUPPORTED(ASSERT_NOT_REACHED(), "");
+ EXPECT_DEATH_IF_SUPPORTED(DCHECK_AT(false, __FILE__, __LINE__), "");
+#else
+ ASSERT(false);
+ ASSERT_NOT_REACHED();
+ DCHECK_AT(false, __FILE__, __LINE__);
#endif
RELEASE_ASSERT(true);
@@ -23,6 +28,8 @@ TEST(AssertionsTest, Assertions) {
SECURITY_DCHECK(true);
#if ENABLE(SECURITY_ASSERT)
EXPECT_DEATH_IF_SUPPORTED(SECURITY_DCHECK(false), "");
+#else
+ SECURITY_DCHECK(false);
#endif
SECURITY_CHECK(true);
« no previous file with comments | « third_party/WebKit/Source/wtf/Assertions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698