| Index: include/core/SkTypes.h
|
| diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
|
| index c112b0364f1ab59967e97d40790b59532a20d397..0d31efc6ccf7dd904dd7232b094aedaddbbc6870 100644
|
| --- a/include/core/SkTypes.h
|
| +++ b/include/core/SkTypes.h
|
| @@ -67,7 +67,7 @@ SK_API extern void sk_out_of_memory(void);
|
| The platform implementation must not return, but should either throw
|
| an exception or otherwise exit.
|
| */
|
| -SK_API extern void sk_throw(void);
|
| +SK_API extern void sk_abort_no_print(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,8 +128,10 @@ inline void operator delete(void* p) {
|
| SK_API void SkDebugf(const char format[], ...);
|
| #endif
|
|
|
| +#define SkASSERT_RELEASE(cond) if(!(cond)) { SK_ABORT(#cond); }
|
| +
|
| #ifdef SK_DEBUG
|
| - #define SkASSERT(cond) SK_ALWAYSBREAK(cond)
|
| + #define SkASSERT(cond) SkASSERT_RELEASE(cond)
|
| #define SkDEBUGFAIL(message) SkASSERT(false && message)
|
| #define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__)
|
| #define SkDEBUGCODE(code) code
|
| @@ -150,7 +152,9 @@ inline void operator delete(void* p) {
|
| #define SkAssertResult(cond) cond
|
| #endif
|
|
|
| -#define SkFAIL(message) SK_ALWAYSBREAK(false && message)
|
| +// Legacy macro names for SK_ABORT
|
| +#define SkFAIL(message) SK_ABORT(message)
|
| +#define sk_throw() SK_ABORT("sk_throw")
|
|
|
| // 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,
|
|
|