diff options
Diffstat (limited to 'ipc/glue/CrashReporterHost.cpp')
-rw-r--r-- | ipc/glue/CrashReporterHost.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
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; } |