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
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index baa6ac1..a47225d 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -131,7 +131,11 @@
#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