зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1269648 - Add missing crash-reporter null checks. r=froydnj.
In two places we fail to check if we successful obtained the crash reporter before we use it. --HG-- extra : rebase_source : f757b8320788220b5a4d5242a0264d577d92f15e
This commit is contained in:
Родитель
3017794ba8
Коммит
8d71390a3e
|
@ -50,7 +50,9 @@ TestCrashyOperation(void (*aCrashyOperation)())
|
|||
#ifdef MOZ_CRASHREPORTER
|
||||
nsCOMPtr<nsICrashReporter> crashreporter =
|
||||
do_GetService("@mozilla.org/toolkit/crash-reporter;1");
|
||||
crashreporter->SetEnabled(false);
|
||||
if (crashreporter) {
|
||||
crashreporter->SetEnabled(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Child: perform the crashy operation.
|
||||
|
|
|
@ -463,7 +463,9 @@ static bool SaveMemoryReportNearOOM()
|
|||
if (needMemoryReport) {
|
||||
nsCOMPtr<nsICrashReporter> cr =
|
||||
do_GetService("@mozilla.org/toolkit/crash-reporter;1");
|
||||
cr->SaveMemoryReport();
|
||||
if (cr) {
|
||||
cr->SaveMemoryReport();
|
||||
}
|
||||
}
|
||||
|
||||
return needMemoryReport;
|
||||
|
|
Загрузка…
Ссылка в новой задаче