Bug 824224: Make mozalloc_abort() not MOZ_NORETURN and log errors to logcat. r=glandium

This commit is contained in:
Chris Jones 2013-01-04 13:28:37 -08:00
parent 19cc88082d
commit 36428f7dd6
2 changed files with 10 additions and 3 deletions

View File

@ -9,17 +9,24 @@
# define MOZALLOC_EXPORT __declspec(dllexport)
#endif
#include "mozilla/Assertions.h"
#include "mozilla/mozalloc_abort.h"
#ifdef ANDROID
# include <android/log.h>
#endif
#include <stdio.h>
#include "mozilla/mozalloc_abort.h"
#include "mozilla/Assertions.h"
void
mozalloc_abort(const char* const msg)
{
#ifndef ANDROID
fputs(msg, stderr);
fputs("\n", stderr);
#else
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "mozalloc_abort: %s", msg);
#endif
MOZ_CRASH();
}

View File

@ -27,7 +27,7 @@
* Terminate this process in such a way that breakpad is triggered, if
* at all possible.
*/
MOZ_NORETURN MOZALLOC_EXPORT void mozalloc_abort(const char* const msg);
MOZALLOC_EXPORT void mozalloc_abort(const char* const msg);
#endif /* ifndef mozilla_mozalloc_abort_h */