mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 1325651 - Assume failure in case of early returns in a couple of places; r=bzbarsky
This commit is contained in:
parent
8f2731ad19
commit
b4fa73d470
@ -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);
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user