Index: include/core/SkPostConfig.h |
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h |
index 0482a70de3001be92cb661c34f4803dc50944d25..02b8b8b30541a7ce72cefcfa38bbb8f7dfbc2e74 100644 |
--- a/include/core/SkPostConfig.h |
+++ b/include/core/SkPostConfig.h |
@@ -148,7 +148,18 @@ |
#endif |
#ifndef SK_ALWAYSBREAK |
-# ifdef SK_DEBUG |
+# if defined(GOOGLE3) |
+ void DebugWriteToStderr(const char*, void*); |
+ void DumpStackTrace(int skip_count, void w(const char*, void*), |
+ void* arg); |
+# define SK_ALWAYSBREAK(cond) do { \ |
+ if (cond) break; \ |
+ SkNO_RETURN_HINT(); \ |
+ SkDebugf("%s:%d: failed assertion \"%s\"\n", __FILE__, __LINE__, #cond); \ |
+ DumpStackTrace(0, DebugWriteToStderr, nullptr); \ |
+ SK_CRASH(); \ |
+ } while (false) |
+# elif defined(SK_DEBUG) |
# define SK_ALWAYSBREAK(cond) do { \ |
if (cond) break; \ |
SkNO_RETURN_HINT(); \ |