Bug 1613943 - BeaconStreamListener::OnStartRequest should not set an network error. network code will interpret that as a real network error and close a connection immediately. r=bzbarsky, a=RyanVM
authorDragana Damjanovic <dd.mozilla@gmail.com>
Tue, 11 Feb 2020 16:11:22 +0000
changeset 574981 759e62765cc41f186d0981e84708465dc41acbec
parent 574980 806d21c68f121efe042da7904920b58a2d454670
child 574982 c76ab0e6ad6a3dee9ade57d0727d7548c08f8f24
push id2267
push userryanvm@gmail.com
push dateMon, 17 Feb 2020 14:26:47 +0000
treeherdermozilla-release@5b0905233e5d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky, RyanVM
bugs1613943
milestone73.0.1
Bug 1613943 - BeaconStreamListener::OnStartRequest should not set an network error. network code will interpret that as a real network error and close a connection immediately. r=bzbarsky, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D62129
dom/base/Navigator.cpp
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1043,18 +1043,17 @@ class BeaconStreamListener final : publi
 
 NS_IMPL_ISUPPORTS(BeaconStreamListener, nsIStreamListener, nsIRequestObserver)
 
 NS_IMETHODIMP
 BeaconStreamListener::OnStartRequest(nsIRequest* aRequest) {
   // release the loadgroup first
   mLoadGroup = nullptr;
 
-  aRequest->Cancel(NS_ERROR_NET_INTERRUPT);
-  return NS_BINDING_ABORTED;
+  return NS_ERROR_ABORT;
 }
 
 NS_IMETHODIMP
 BeaconStreamListener::OnStopRequest(nsIRequest* aRequest, nsresult aStatus) {
   return NS_OK;
 }
 
 NS_IMETHODIMP