Commit e143910f authored by valenting's avatar valenting
Browse files

Bug 1520062 - Don't exit HttpChannelChild::DoOnStopRequest if call returns error code r=kershaw

Differential Revision: https://phabricator.services.mozilla.com/D16548

--HG--
extra : moz-landing-system : lando
parent da92d035
Loading
Loading
Loading
Loading
+26 −23
Original line number Diff line number Diff line
@@ -1187,6 +1187,7 @@ void HttpChannelChild::DoOnStopRequest(nsIRequest* aRequest,
  MOZ_ASSERT(NS_IsMainThread());
  MOZ_ASSERT(!mIsPending);

  auto checkForBlockedContent = [&]() {
    // NB: We use aChannelStatus here instead of mStatus because if there was an
    // nsCORSListenerProxy on this request, it will override the tracking
    // protection's return value.
@@ -1207,9 +1208,11 @@ void HttpChannelChild::DoOnStopRequest(nsIRequest* aRequest,
      rv = GetMatchedFullHash(fullhash);
      NS_ENSURE_SUCCESS_VOID(rv);

    UrlClassifierCommon::SetBlockedContent(this, aChannelStatus, list, provider,
                                           fullhash);
      UrlClassifierCommon::SetBlockedContent(this, aChannelStatus, list,
                                             provider, fullhash);
    }
  };
  checkForBlockedContent();

  MOZ_ASSERT(!mOnStopRequestCalled, "We should not call OnStopRequest twice");