Bug 1406442 - Improve IPCShutdownState annotation for SendFinishShutdown state to know message status. r=ehsan

This commit is contained in:
Andrew Osmond 2017-10-06 14:50:58 -04:00
Родитель 1a5224f143
Коммит 8621dd62f4
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -3035,11 +3035,16 @@ ContentChild::RecvShutdown()
#if defined(MOZ_CRASHREPORTER)
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCShutdownState"),
NS_LITERAL_CSTRING("SendFinishShutdown"));
#endif
NS_LITERAL_CSTRING("SendFinishShutdown (sending)"));
bool sent = SendFinishShutdown();
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCShutdownState"),
sent ? NS_LITERAL_CSTRING("SendFinishShutdown (sent)")
: NS_LITERAL_CSTRING("SendFinishShutdown (failed)"));
#else
// Ignore errors here. If this fails, the parent will kill us after a
// timeout.
Unused << SendFinishShutdown();
#endif
return IPC_OK();
}