Bug 1412048 - Replace some NS_RUNTIMEABORT(var) calls with MOZ_CRASH_UNSAFE_PRINTF. r?froydnj data-review?francois
MOZ_CRASH_UNSAFE_PRINTF causes data collection because crash strings are annotated to crash-stats and are publicly visible. Firefox data stewards must do data review on usages of this macro. However, all the crash strings this patch collects with MOZ_CRASH_UNSAFE_PRINTF are already collected with NS_RUNTIMEABORT.
MozReview-Commit-ID: 5ujXa9MHH5Z
--- a/ipc/glue/ProtocolUtils.cpp
+++ b/ipc/glue/ProtocolUtils.cpp
@@ -311,18 +311,17 @@ void
LogicError(const char* aMsg)
{
MOZ_CRASH_UNSAFE_OOL(aMsg);
}
void
ActorIdReadError(const char* aActorDescription)
{
- nsPrintfCString message("Error deserializing id for %s", aActorDescription);
- NS_RUNTIMEABORT(message.get());
+ MOZ_CRASH_UNSAFE_PRINTF("Error deserializing id for %s", aActorDescription);
}
void
BadActorIdError(const char* aActorDescription)
{
nsPrintfCString message("bad id for %s", aActorDescription);
ProtocolErrorBreakpoint(message.get());
}
@@ -340,32 +339,29 @@ MismatchedActorTypeError(const char* aAc
nsPrintfCString message("actor that should be of type %s has different type",
aActorDescription);
ProtocolErrorBreakpoint(message.get());
}
void
UnionTypeReadError(const char* aUnionName)
{
- nsPrintfCString message("error deserializing type of union %s", aUnionName);
- NS_RUNTIMEABORT(message.get());
+ MOZ_CRASH_UNSAFE_PRINTF("error deserializing type of union %s", aUnionName);
}
void
ArrayLengthReadError(const char* aElementName)
{
- nsPrintfCString message("error deserializing length of %s[]", aElementName);
- NS_RUNTIMEABORT(message.get());
+ MOZ_CRASH_UNSAFE_PRINTF("error deserializing length of %s[]", aElementName);
}
void
SentinelReadError(const char* aClassName)
{
- nsPrintfCString message("incorrect sentinel when reading %s", aClassName);
- NS_RUNTIMEABORT(message.get());
+ MOZ_CRASH_UNSAFE_PRINTF("incorrect sentinel when reading %s", aClassName);
}
void
TableToArray(const nsTHashtable<nsPtrHashKey<void>>& aTable,
nsTArray<void*>& aArray)
{
uint32_t i = 0;
void** elements = aArray.AppendElements(aTable.Count());