Bug 1375130: Add missing return value check in a11y::LazyInstantiator call to GetClientExecutableName; r=eeejay

MozReview-Commit-ID: JAULVCzMn60
This commit is contained in:
Aaron Klotz 2017-06-21 15:22:34 -06:00
Родитель 30e4348236
Коммит 1cf49f3a1d
1 изменённых файлов: 9 добавлений и 3 удалений

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

@ -237,7 +237,11 @@ LazyInstantiator::ShouldInstantiate(const DWORD aClientTid)
}
nsCOMPtr<nsIFile> clientExe;
GetClientExecutableName(aClientTid, getter_AddRefs(clientExe));
if (!GetClientExecutableName(aClientTid, getter_AddRefs(clientExe))) {
AccumulateTelemetry(NS_LITERAL_STRING("(Failed to retrieve client image name)"));
// We should return true as a failsafe
return true;
}
// Blocklist checks should go here. return false if we should not instantiate.
/*
@ -340,8 +344,10 @@ LazyInstantiator::AccumulateTelemetry(const nsString& aValue)
Telemetry::ScalarSet(Telemetry::ScalarID::A11Y_INSTANTIATORS, aValue);
}
mTelemetryThread->Shutdown();
mTelemetryThread = nullptr;
if (mTelemetryThread) {
mTelemetryThread->Shutdown();
mTelemetryThread = nullptr;
}
}
#endif // defined(MOZ_TELEMETRY_REPORTING)