Bug 787675 - When jemalloc hits a fatal assertion, crash within a new stack frame, in the hopes of making the crashstats more understandable. r=glandium

This commit is contained in:
Justin Lebar 2012-09-03 22:01:24 -04:00
parent 120146b67e
commit be343871b9

View File

@ -1551,11 +1551,21 @@ void (*_malloc_message)(const char *p1, const char *p2, const char *p3,
#endif
#include <mozilla/Assertions.h>
#include <mozilla/Attributes.h>
/* RELEASE_ASSERT calls jemalloc_crash() instead of calling MOZ_CRASH()
* directly because we want crashing to add a frame to the stack. This makes
* it easier to find the failing assertion in crash stacks. */
MOZ_NEVER_INLINE static void
jemalloc_crash()
{
MOZ_CRASH();
}
#if defined(MOZ_JEMALLOC_HARD_ASSERTS)
# define RELEASE_ASSERT(assertion) do { \
if (!(assertion)) { \
MOZ_CRASH(); \
jemalloc_crash(); \
} \
} while (0)
#else