summaryrefslogtreecommitdiffstats
path: root/netwerk/base/Predictor.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /netwerk/base/Predictor.cpp
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/base/Predictor.cpp')
-rw-r--r--netwerk/base/Predictor.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/netwerk/base/Predictor.cpp b/netwerk/base/Predictor.cpp
index de19d0e06e..0c604d9d9a 100644
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -487,7 +487,9 @@ Predictor::PredictNative(nsIURI* targetURI, nsIURI* sourceURI,
PREDICTOR_LOG(("Predictor::Predict"));
if (IsNeckoChild()) {
- MOZ_DIAGNOSTIC_ASSERT(gNeckoChild);
+ if (!gNeckoChild) {
+ return NS_ERROR_FAILURE;
+ }
PREDICTOR_LOG((" called on child process"));
// If two different threads are predicting concurently, this will be
@@ -1237,7 +1239,9 @@ Predictor::LearnNative(nsIURI* targetURI, nsIURI* sourceURI,
PREDICTOR_LOG(("Predictor::Learn"));
if (IsNeckoChild()) {
- MOZ_DIAGNOSTIC_ASSERT(gNeckoChild);
+ if (!gNeckoChild) {
+ return NS_ERROR_FAILURE;
+ }
PREDICTOR_LOG((" called on child process"));
@@ -1715,7 +1719,9 @@ Predictor::Reset() {
PREDICTOR_LOG(("Predictor::Reset"));
if (IsNeckoChild()) {
- MOZ_DIAGNOSTIC_ASSERT(gNeckoChild);
+ if (!gNeckoChild) {
+ return NS_ERROR_FAILURE;
+ }
PREDICTOR_LOG((" forwarding to parent process"));
gNeckoChild->SendPredReset();