Bug 1325651 - Assume failure in case of early returns in a couple of places; r=bzbarsky

This commit is contained in:
Ehsan Akhgari 2016-12-23 18:28:39 -05:00
parent 8f2731ad19
commit b4fa73d470
2 changed files with 3 additions and 0 deletions

View File

@ -4793,6 +4793,7 @@ ContentParent::RecvPURLClassifierConstructor(PURLClassifierParent* aActor,
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aActor);
*aSuccess = false;
auto* actor = static_cast<URLClassifierParent*>(aActor);
nsCOMPtr<nsIPrincipal> principal(aPrincipal);

View File

@ -18,6 +18,7 @@ URLClassifierParent::StartClassify(nsIPrincipal* aPrincipal,
bool aUseTrackingProtection,
bool* aSuccess)
{
*aSuccess = false;
nsresult rv = NS_OK;
// Note that in safe mode, the URL classifier service isn't available, so we
// should handle the service not being present gracefully.
@ -34,6 +35,7 @@ URLClassifierParent::StartClassify(nsIPrincipal* aPrincipal,
// without ever calling out callback in both cases.
// This means that code using this in the child process will only get a hit
// on its callback if some classification actually happens.
*aSuccess = false;
ClassificationFailed();
}
return IPC_OK();