From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- ipc/glue/CrashReporterHost.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'ipc/glue/CrashReporterHost.cpp') diff --git a/ipc/glue/CrashReporterHost.cpp b/ipc/glue/CrashReporterHost.cpp index d4f0c0f968..9fee9187a6 100644 --- a/ipc/glue/CrashReporterHost.cpp +++ b/ipc/glue/CrashReporterHost.cpp @@ -153,27 +153,26 @@ void CrashReporterHost::NotifyCrashService(GeckoProcessType aProcessType, getter_AddRefs(promise)); } -void CrashReporterHost::AddAnnotation(CrashReporter::Annotation aKey, - bool aValue) { +void CrashReporterHost::AddAnnotationBool(CrashReporter::Annotation aKey, + bool aValue) { + MOZ_ASSERT(TypeOfAnnotation(aKey) == CrashReporter::AnnotationType::Boolean, + "Wrong annotation type"); mExtraAnnotations[aKey] = aValue ? "1"_ns : "0"_ns; } -void CrashReporterHost::AddAnnotation(CrashReporter::Annotation aKey, - int aValue) { +void CrashReporterHost::AddAnnotationU32(CrashReporter::Annotation aKey, + uint32_t aValue) { + MOZ_ASSERT(TypeOfAnnotation(aKey) == CrashReporter::AnnotationType::U32, + "Wrong annotation type"); nsAutoCString valueString; valueString.AppendInt(aValue); mExtraAnnotations[aKey] = valueString; } -void CrashReporterHost::AddAnnotation(CrashReporter::Annotation aKey, - unsigned int aValue) { - nsAutoCString valueString; - valueString.AppendInt(aValue); - mExtraAnnotations[aKey] = valueString; -} - -void CrashReporterHost::AddAnnotation(CrashReporter::Annotation aKey, - const nsACString& aValue) { +void CrashReporterHost::AddAnnotationNSCString(CrashReporter::Annotation aKey, + const nsACString& aValue) { + MOZ_ASSERT(TypeOfAnnotation(aKey) == CrashReporter::AnnotationType::String, + "Wrong annotation type"); mExtraAnnotations[aKey] = aValue; } -- cgit v1.2.3