Skip to content

Commit

Permalink
Bug 1805796 - Remove MOZ_DIAGNOSTIC_ASSERT(gNeckoChild), r=necko-revi…
Browse files Browse the repository at this point in the history
…ewers,valentin

The Pernosco session shows that the content child is about to destroy at that point, so there is not much we can do.
Removing the diagnostic assert seems to be the only way.

Differential Revision: https://phabricator.services.mozilla.com/D202875
  • Loading branch information
KershawChang committed Feb 28, 2024
1 parent df99531 commit 77b1faa
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions netwerk/base/Predictor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"));

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 77b1faa

Please sign in to comment.