diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /ipc/glue/ProtocolUtils.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/glue/ProtocolUtils.cpp')
-rw-r--r-- | ipc/glue/ProtocolUtils.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
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<IProtocol*> actor, const char* where, #endif } +/* static */ +IPCResult IPCResult::FailForTesting(NotNull<IProtocol*> 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<uint32_t>(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!"); |