Bug 1203680 P8 nsCORSListenerProxy::OnStartRequest must always call outer OnStartRequest. r=ehsan
authorBen Kelly <ben@wanderview.com>
Tue, 15 Sep 2015 10:15:45 -0700
changeset 262593 e38a5ece0995e70472f6889653212373a55ab081
parent 262592 2ceadfc720f2a4a19ac38c18b198db3dc74610f7
child 262594 ff494eb6487b2951588d73eade04339278534e8c
push id65070
push userbkelly@mozilla.com
push dateTue, 15 Sep 2015 17:15:47 +0000
treeherdermozilla-inbound@e38a5ece0995 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1203680
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1203680 P8 nsCORSListenerProxy::OnStartRequest must always call outer OnStartRequest. r=ehsan
netwerk/protocol/http/nsCORSListenerProxy.cpp
--- a/netwerk/protocol/http/nsCORSListenerProxy.cpp
+++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp
@@ -511,18 +511,20 @@ nsCORSListenerProxy::OnStartRequest(nsIR
           // OK to use mRequestingPrincipal since preflights never get
           // redirected.
           sPreflightCache->RemoveEntries(uri, mRequestingPrincipal);
         } else {
           nsCOMPtr<nsIHttpChannelChild> httpChannelChild =
             do_QueryInterface(channel);
           if (httpChannelChild) {
             rv = httpChannelChild->RemoveCorsPreflightCacheEntry(uri, mRequestingPrincipal);
-            if (NS_WARN_IF(NS_FAILED(rv))) {
-              return rv;
+            if (NS_FAILED(rv)) {
+              // Only warn here to ensure we fall through the request Cancel()
+              // and outer listener OnStartRequest() calls.
+              NS_WARNING("Failed to remove CORS preflight cache entry!");
             }
           }
         }
       }
     }
 
     aRequest->Cancel(NS_ERROR_DOM_BAD_URI);
     mOuterListener->OnStartRequest(aRequest, aContext);