Backed out 4 changesets (bug 1496503) for xpcshell failures at toolkit/crashreporter/test/unit/test_crash_rust_panic.js on a CLOSED TREE

Backed out changeset cfeee3d5ed6a (bug 1496503)
Backed out changeset 164a5a49fd25 (bug 1496503)
Backed out changeset d0b6c1fc149d (bug 1496503)
Backed out changeset bfb4ee856c71 (bug 1496503)
This commit is contained in:
Coroiu Cristina
2018-11-14 09:00:06 +02:00
parent 528aa8f2c1
commit e770c03004
7 changed files with 84 additions and 120 deletions

View File

@@ -120,7 +120,9 @@ using mozilla::ipc::CrashReporterClient;
// From toolkit/library/rust/shared/lib.rs
extern "C" {
void install_rust_panic_hook();
void install_rust_oom_hook();
bool get_rust_panic_reason(char** reason, size_t* length);
}
@@ -906,8 +908,12 @@ WriteEscapedMozCrashReason(PlatformWriter& aWriter)
{
const char *reason;
size_t len;
char *rust_panic_reason;
bool rust_panic = get_rust_panic_reason(&rust_panic_reason, &len);
if (gMozCrashReason != nullptr) {
if (rust_panic) {
reason = rust_panic_reason;
} else if (gMozCrashReason != nullptr) {
reason = gMozCrashReason;
len = strlen(reason);
} else {
@@ -1736,6 +1742,7 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
oldTerminateHandler = std::set_terminate(&TerminateHandler);
install_rust_panic_hook();
install_rust_oom_hook();
InitThreadAnnotation();
@@ -3600,6 +3607,8 @@ SetRemoteExceptionHandler(const nsACString& crashPipe,
oldTerminateHandler = std::set_terminate(&TerminateHandler);
install_rust_panic_hook();
// we either do remote or nothing, no fallback to regular crash reporting
return gExceptionHandler->IsOutOfProcess();
}
@@ -3646,6 +3655,8 @@ SetRemoteExceptionHandler()
oldTerminateHandler = std::set_terminate(&TerminateHandler);
install_rust_panic_hook();
// we either do remote or nothing, no fallback to regular crash reporting
return gExceptionHandler->IsOutOfProcess();
}
@@ -3674,6 +3685,8 @@ SetRemoteExceptionHandler(const nsACString& crashPipe)
oldTerminateHandler = std::set_terminate(&TerminateHandler);
install_rust_panic_hook();
// we either do remote or nothing, no fallback to regular crash reporting
return gExceptionHandler->IsOutOfProcess();
}