Bug 576755 - JS_Assert on Windows produces a stack MSVS 2010 debugger can't decipher. r=dmandelin.

This commit is contained in:
Jason Orendorff 2010-07-06 04:29:45 -05:00
parent bd536137bb
commit eeebc509e7

View File

@ -67,7 +67,11 @@ JS_PUBLIC_API(void) JS_Assert(const char *s, const char *file, JSIntn ln)
fprintf(stderr, "Assertion failure: %s, at %s:%d\n", s, file, ln);
fflush(stderr);
#if defined(WIN32)
DebugBreak();
/*
* We used to call DebugBreak() on Windows, but amazingly, it causes
* the MSVS 2010 debugger not to be able to recover a call stack.
*/
*((int *) NULL) = 0;
exit(3);
#elif defined(__APPLE__)
/*