Bug 1507049 - Rename MOZ_CrashOOL MOZ_Crash. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D18513

--HG--
extra : rebase_source : 00910ccc380f24a12181fef2a72d84c1170cb9fe
extra : source : d39e75533e61b315c9ee0000ea74eca3bf474f58
This commit is contained in:
Chris Peterson 2019-02-03 00:00:12 -08:00
Родитель 8add624474
Коммит cedea8a566
5 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -424,8 +424,8 @@ function ignoreContents(entry)
"abort",
/MOZ_ReportAssertionFailure/,
/MOZ_ReportCrash/,
/MOZ_Crash/,
/MOZ_CrashPrintf/,
/MOZ_CrashOOL/,
/AnnotateMozCrashReason/,
/InvalidArrayIndex_CRASH/,
/NS_ABORT_OOM/,

Просмотреть файл

@ -50,9 +50,9 @@ MOZ_FORMAT_PRINTF(3, 4) void MOZ_CrashPrintf(const char* aFilename, int aLine,
ret >= 0 && size_t(ret) < sPrintfCrashReasonSize,
"Could not write the explanation string to the supplied buffer!");
#ifdef DEBUG
MOZ_CrashOOL(aFilename, aLine, sPrintfCrashReason);
MOZ_Crash(aFilename, aLine, sPrintfCrashReason);
#else
MOZ_CrashOOL(nullptr, aLine, sPrintfCrashReason);
MOZ_Crash(nullptr, aLine, sPrintfCrashReason);
#endif
}

Просмотреть файл

@ -304,16 +304,16 @@ MOZ_NoReturn(int aLine) {
* to crash-stats and are publicly visible. Firefox data stewards must do data
* review on usages of this macro.
*/
static inline MOZ_COLD MOZ_NORETURN void MOZ_CrashOOL(const char* aFilename,
int aLine,
const char* aReason) {
static inline MOZ_COLD MOZ_NORETURN void MOZ_Crash(const char* aFilename,
int aLine,
const char* aReason) {
#ifdef DEBUG
MOZ_ReportCrash(aReason, aFilename, aLine);
#endif
MOZ_CRASH_ANNOTATE(aReason);
MOZ_REALLY_CRASH(aLine);
}
#define MOZ_CRASH_UNSAFE_OOL(reason) MOZ_CrashOOL(__FILE__, __LINE__, reason)
#define MOZ_CRASH_UNSAFE_OOL(reason) MOZ_Crash(__FILE__, __LINE__, reason)
static const size_t sPrintfMaxArgs = 4;
static const size_t sPrintfCrashReasonSize = 1024;

Просмотреть файл

@ -155,7 +155,7 @@ pub extern "C" fn intentional_panic(message: *const c_char) {
}
extern "C" {
// We can't use MOZ_CrashOOL directly because it may be weakly linked
// We can't use MOZ_Crash directly because it may be weakly linked
// to libxul, and rust can't handle that.
fn GeckoCrashOOL(filename: *const c_char, line: c_int, reason: *const c_char) -> !;
}
@ -235,7 +235,7 @@ fn panic_hook(info: &panic::PanicInfo) {
}
}
/// Configure a panic hook to redirect rust panics to Gecko's MOZ_CrashOOL.
/// Configure a panic hook to redirect rust panics to Gecko's MOZ_Crash.
#[no_mangle]
pub extern "C" fn install_rust_panic_hook() {
panic::set_hook(Box::new(panic_hook));

Просмотреть файл

@ -5193,10 +5193,10 @@ void XRE_EnableSameExecutableForContentProc() {
// malloc_handle_oom for it.
extern "C" void GeckoHandleOOM(size_t size) { mozalloc_handle_oom(size); }
// Similarly, this wraps MOZ_CrashOOL
// Similarly, this wraps MOZ_Crash
extern "C" void GeckoCrashOOL(const char* aFilename, int aLine,
const char* aReason) {
MOZ_CrashOOL(aFilename, aLine, aReason);
MOZ_Crash(aFilename, aLine, aReason);
}
// From toolkit/library/rust/shared/lib.rs