From 2036492160c573359d5f5472dc2f9a781344fece Mon Sep 17 00:00:00 2001 From: Jason Orendorff Date: Wed, 3 Feb 2010 14:53:26 -0600 Subject: [PATCH] Bug 524522 revisited - Make JS_ASSERT trigger Breakpad on Mac OS X. rs=luke. --- js/src/jsutil.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/src/jsutil.cpp b/js/src/jsutil.cpp index 0394996eb0..679aa5fbca 100644 --- a/js/src/jsutil.cpp +++ b/js/src/jsutil.cpp @@ -65,9 +65,14 @@ JS_PUBLIC_API(void) JS_Assert(const char *s, const char *file, JSIntn ln) #if defined(WIN32) DebugBreak(); exit(3); +#elif defined(__APPLE__) + /* + * On Mac OS X, Breakpad ignores signals. Only real Mach exceptions are + * trapped. + */ + *((int *) NULL) = 0; /* To continue from here in GDB: "return" then "continue". */ #else - /* In GDB, you can continue from here with the command "signal 0". */ - raise(SIGABRT); + raise(SIGABRT); /* To continue from here in GDB: "signal 0". */ #endif } -- 2.11.4.GIT