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

Unified Diff: include/core/SkPostConfig.h

Issue 1423013004: For BUILD.public, let SkPreConfig.h set SK_RELEASE based on NDEBUG. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 2 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 | « BUILD.public ('k') | tests/AtomicTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPostConfig.h
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h
index 76f504f4592a7565934de72bd82abade588cca69..b845fa48c9ee6d6535fc0b15d3fe78db9f4d6db6 100644
--- a/include/core/SkPostConfig.h
+++ b/include/core/SkPostConfig.h
@@ -148,7 +148,16 @@
#endif
#ifndef SK_ALWAYSBREAK
-# ifdef SK_DEBUG
+# if defined(GOOGLE3)
+# include "base/examine_stack.h"
+# define SK_ALWAYSBREAK(cond) do { \
+ if (cond) break; \
+ SkNO_RETURN_HINT(); \
+ SkDebugf("%s:%d: failed assertion \"%s\"\n", __FILE__, __LINE__, #cond); \
+ DumpStackTrace(0, DebugWriteToStderr, NULL); \
mtklein 2015/10/28 19:09:07 Think we can just forward-declare this instead of
+ SK_CRASH(); \
+ } while (false)
+# elif defined(SK_DEBUG)
# define SK_ALWAYSBREAK(cond) do { \
if (cond) break; \
SkNO_RETURN_HINT(); \
« no previous file with comments | « BUILD.public ('k') | tests/AtomicTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698