Index: include/core/SkTypes.h |
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h |
index 0d31efc6ccf7dd904dd7232b094aedaddbbc6870..c112b0364f1ab59967e97d40790b59532a20d397 100644 |
--- a/include/core/SkTypes.h |
+++ b/include/core/SkTypes.h |
@@ -67,7 +67,7 @@ |
The platform implementation must not return, but should either throw |
an exception or otherwise exit. |
*/ |
-SK_API extern void sk_abort_no_print(void); |
+SK_API extern void sk_throw(void); |
enum { |
SK_MALLOC_TEMP = 0x01, //!< hint to sk_malloc that the requested memory will be freed in the scope of the stack frame |
@@ -128,10 +128,8 @@ |
SK_API void SkDebugf(const char format[], ...); |
#endif |
-#define SkASSERT_RELEASE(cond) if(!(cond)) { SK_ABORT(#cond); } |
- |
#ifdef SK_DEBUG |
- #define SkASSERT(cond) SkASSERT_RELEASE(cond) |
+ #define SkASSERT(cond) SK_ALWAYSBREAK(cond) |
#define SkDEBUGFAIL(message) SkASSERT(false && message) |
#define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__) |
#define SkDEBUGCODE(code) code |
@@ -152,9 +150,7 @@ |
#define SkAssertResult(cond) cond |
#endif |
-// Legacy macro names for SK_ABORT |
-#define SkFAIL(message) SK_ABORT(message) |
-#define sk_throw() SK_ABORT("sk_throw") |
+#define SkFAIL(message) SK_ALWAYSBREAK(false && message) |
// We want to evaluate cond only once, and inside the SkASSERT somewhere so we see its string form. |
// So we use the comma operator to make an SkDebugf that always returns false: we'll evaluate cond, |