From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- ipc/glue/ProtocolUtils.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'ipc/glue/ProtocolUtils.cpp') diff --git a/ipc/glue/ProtocolUtils.cpp b/ipc/glue/ProtocolUtils.cpp index bd78dce607..b29221d476 100644 --- a/ipc/glue/ProtocolUtils.cpp +++ b/ipc/glue/ProtocolUtils.cpp @@ -73,23 +73,28 @@ IPCResult IPCResult::FailImpl(NotNull actor, const char* where, #endif } +/* static */ +IPCResult IPCResult::FailForTesting(NotNull actor, + const char* where, const char* why) { + return IPCResult(false); +} + void AnnotateSystemError() { - int64_t error = 0; + uint32_t error = 0; #if defined(XP_WIN) error = ::GetLastError(); #else error = errno; #endif if (error) { - CrashReporter::AnnotateCrashReport( - CrashReporter::Annotation::IPCSystemError, - nsPrintfCString("%" PRId64, error)); + CrashReporter::RecordAnnotationU32( + CrashReporter::Annotation::IPCSystemError, error); } } #if defined(XP_MACOSX) void AnnotateCrashReportWithErrno(CrashReporter::Annotation tag, int error) { - CrashReporter::AnnotateCrashReport(tag, error); + CrashReporter::RecordAnnotationU32(tag, static_cast(error)); } #endif // defined(XP_MACOSX) @@ -191,8 +196,8 @@ void FatalError(const char* aMsg, bool aIsParent) { // this process if we're off the main thread. formattedMessage.AppendLiteral("\". Intentionally crashing."); NS_ERROR(formattedMessage.get()); - CrashReporter::AnnotateCrashReport( - CrashReporter::Annotation::IPCFatalErrorMsg, nsDependentCString(aMsg)); + CrashReporter::RecordAnnotationCString( + CrashReporter::Annotation::IPCFatalErrorMsg, aMsg); AnnotateSystemError(); #ifndef FUZZING MOZ_CRASH("IPC FatalError in the parent process!"); -- cgit v1.2.3