Verified Commit 9f7e836f authored by Artur Iunusov's avatar Artur Iunusov Committed by ma1
Browse files

Bug 2045397 - Cancel the network channel when failing a cached worker script...

Bug 2045397 - Cancel the network channel when failing a cached worker script load  a=RyanVM DONTBUILD

Original Revision: https://phabricator.services.mozilla.com/D307328

Differential Revision: https://phabricator.services.mozilla.com/D308528
parent a2aaa91d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -292,6 +292,14 @@ void CacheLoadHandler::Fail(nsresult aRv) {
    loadContext->mLoadResult = aRv;
    mRequestHandle->MaybeExecuteFinishedScripts();
  } else {
    if (loadContext->mChannel) {
      nsresult rv = loadContext->mChannel->Cancel(aRv);
      if (NS_SUCCEEDED(rv)) {
        return;
      }

      NS_WARNING("Failed to cancel channel!");
    }
    mRequestHandle->LoadingFinished(aRv);
  }
}