fix windows assert
Windows asserts trigger out of memory stack traces that are confusing. This permits windows to break more directly, stopping the IDE at the assert and providing a less confusing stacktrace outside of the IDE. R=reed@google.com,herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2039443002 Review-Url: https://codereview.chromium.org/2039443002
This commit is contained in:
parent
1915b0bab2
commit
ae92262f3b
@ -131,7 +131,11 @@ inline void operator delete(void* p) {
|
||||
#define SkASSERT_RELEASE(cond) if(!(cond)) { SK_ABORT(#cond); }
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#define SkASSERT(cond) SkASSERT_RELEASE(cond)
|
||||
#if defined SK_BUILD_FOR_WIN
|
||||
#define SkASSERT(cond) if(!(cond)) { __debugbreak(); }
|
||||
#else
|
||||
#define SkASSERT(cond) SkASSERT_RELEASE(cond)
|
||||
#endif
|
||||
#define SkDEBUGFAIL(message) SkASSERT(false && message)
|
||||
#define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__)
|
||||
#define SkDEBUGCODE(code) code
|
||||
|
Loading…
Reference in New Issue
Block a user