From b4fa73d470423b1ebe5b511844152cf033979aae Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 23 Dec 2016 18:28:39 -0500 Subject: [PATCH] Bug 1325651 - Assume failure in case of early returns in a couple of places; r=bzbarsky --- dom/ipc/ContentParent.cpp | 1 + dom/ipc/URLClassifierParent.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 86d09cfd8bef..a43571de96d3 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -4793,6 +4793,7 @@ ContentParent::RecvPURLClassifierConstructor(PURLClassifierParent* aActor, { MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(aActor); + *aSuccess = false; auto* actor = static_cast(aActor); nsCOMPtr principal(aPrincipal); diff --git a/dom/ipc/URLClassifierParent.cpp b/dom/ipc/URLClassifierParent.cpp index 816802e9b962..987ee59395f5 100644 --- a/dom/ipc/URLClassifierParent.cpp +++ b/dom/ipc/URLClassifierParent.cpp @@ -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();