Bug 1525319 - Removing context from OnStopRequest r=valentin
☠☠ backed out by d5643033fdd8 ☠ ☠
authorJonathan Kingston <jkt@mozilla.com>
Sun, 24 Feb 2019 20:26:59 +0000
changeset 460832 6d73418988d4f350e0a9e7e9948e2efed035b09b
parent 460831 84ca79bd2dc3f9ac87b63356f7a34880ce4acd1d
child 460833 1d318d5c6b9861302b9cba1c107eb5e74d98c600
push id35608
push useropoprus@mozilla.com
push dateMon, 25 Feb 2019 10:22:07 +0000
treeherdermozilla-central@9f35adb8e466 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1525319
milestone67.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 1525319 - Removing context from OnStopRequest r=valentin Differential Revision: https://phabricator.services.mozilla.com/D20770
docshell/base/nsPingListener.cpp
dom/base/DOMParser.cpp
dom/base/Document.cpp
dom/base/EventSource.cpp
dom/base/Navigator.cpp
dom/base/nsObjectLoadingContent.cpp
dom/base/nsSyncLoadService.cpp
dom/fetch/FetchDriver.cpp
dom/file/MutableBlobStreamListener.cpp
dom/html/HTMLMediaElement.cpp
dom/html/ImageDocument.cpp
dom/html/MediaDocument.cpp
dom/jsurl/nsJSProtocolHandler.cpp
dom/media/ChannelMediaResource.cpp
dom/media/WebVTTListener.cpp
dom/network/TCPSocket.cpp
dom/plugins/base/nsPluginStreamListenerPeer.cpp
dom/presentation/PresentationTCPSessionTransport.cpp
dom/security/ContentVerifier.cpp
dom/security/nsCSPContext.cpp
dom/serviceworkers/ServiceWorkerScriptCache.cpp
dom/webbrowserpersist/nsWebBrowserPersist.cpp
dom/workers/ScriptLoader.cpp
dom/xbl/nsXBLService.cpp
dom/xhr/XMLHttpRequestMainThread.cpp
dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
dom/xul/XULDocument.cpp
extensions/pref/autoconfig/src/nsAutoConfig.cpp
gfx/thebes/gfxSVGGlyphs.cpp
image/SVGDocumentWrapper.cpp
image/VectorImage.cpp
image/decoders/icon/mac/nsIconChannelCocoa.mm
image/decoders/icon/win/nsIconChannel.cpp
image/imgLoader.cpp
image/imgRequest.cpp
layout/style/StreamLoader.cpp
layout/style/nsFontFaceLoader.cpp
media/mtransport/ipc/WebrtcProxyChannel.cpp
modules/libjar/nsJARChannel.cpp
modules/libjar/zipwriter/nsDeflateConverter.cpp
modules/libjar/zipwriter/nsZipDataStream.cpp
modules/libjar/zipwriter/nsZipWriter.cpp
netwerk/base/BackgroundFileSaver.cpp
netwerk/base/MemoryDownloader.cpp
netwerk/base/NetworkConnectivityService.cpp
netwerk/base/Predictor.cpp
netwerk/base/SimpleChannelParent.cpp
netwerk/base/nsAsyncStreamCopier.cpp
netwerk/base/nsBaseChannel.cpp
netwerk/base/nsDownloader.cpp
netwerk/base/nsIRequestObserver.idl
netwerk/base/nsIncrementalDownload.cpp
netwerk/base/nsIncrementalStreamLoader.cpp
netwerk/base/nsInputStreamPump.cpp
netwerk/base/nsLoadGroup.cpp
netwerk/base/nsRequestObserverProxy.cpp
netwerk/base/nsSimpleStreamListener.cpp
netwerk/base/nsStreamListenerTee.cpp
netwerk/base/nsStreamLoader.cpp
netwerk/base/nsSyncStreamListener.cpp
netwerk/dns/TRR.cpp
netwerk/protocol/about/nsAboutCacheEntry.cpp
netwerk/protocol/data/DataChannelParent.cpp
netwerk/protocol/file/FileChannelParent.cpp
netwerk/protocol/ftp/FTPChannelChild.cpp
netwerk/protocol/ftp/FTPChannelParent.cpp
netwerk/protocol/ftp/nsFtpConnectionThread.cpp
netwerk/protocol/http/AlternateServices.cpp
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/HttpChannelParentListener.cpp
netwerk/protocol/http/InterceptedHttpChannel.cpp
netwerk/protocol/http/nsCORSListenerProxy.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/res/ExtensionProtocolHandler.cpp
netwerk/protocol/viewsource/nsViewSourceChannel.cpp
netwerk/protocol/websocket/WebSocketChannel.cpp
netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
netwerk/streamconv/converters/nsDirIndexParser.cpp
netwerk/streamconv/converters/nsFTPDirListingConv.cpp
netwerk/streamconv/converters/nsHTTPCompressConv.cpp
netwerk/streamconv/converters/nsIndexedToHTML.cpp
netwerk/streamconv/converters/nsMultiMixedConv.cpp
netwerk/streamconv/converters/nsUnknownDecoder.cpp
parser/html/nsHtml5StreamListener.cpp
parser/html/nsHtml5StreamParser.cpp
parser/html/nsHtml5StreamParser.h
parser/htmlparser/nsParser.cpp
security/manager/ssl/ContentSignatureVerifier.cpp
security/manager/ssl/PSMContentListener.cpp
security/manager/ssl/PSMContentListener.h
toolkit/components/extensions/webrequest/ChannelWrapper.cpp
toolkit/components/extensions/webrequest/StreamFilterParent.cpp
toolkit/components/places/FaviconHelpers.cpp
toolkit/components/places/nsAnnoProtocolHandler.cpp
toolkit/components/reputationservice/ApplicationReputation.cpp
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
uriloader/base/nsDocLoader.cpp
uriloader/base/nsURILoader.cpp
uriloader/exthandler/ExternalHelperAppChild.cpp
uriloader/exthandler/ExternalHelperAppParent.cpp
uriloader/exthandler/nsExternalHelperAppService.cpp
uriloader/exthandler/nsExternalProtocolHandler.cpp
uriloader/prefetch/nsOfflineCacheUpdate.cpp
uriloader/prefetch/nsPrefetchService.cpp
widget/android/WebExecutorSupport.cpp
--- a/docshell/base/nsPingListener.cpp
+++ b/docshell/base/nsPingListener.cpp
@@ -336,17 +336,17 @@ NS_IMETHODIMP
 nsPingListener::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
                                 nsIInputStream* aStream, uint64_t aOffset,
                                 uint32_t aCount) {
   uint32_t result;
   return aStream->ReadSegments(NS_DiscardSegment, nullptr, aCount, &result);
 }
 
 NS_IMETHODIMP
-nsPingListener::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+nsPingListener::OnStopRequest(nsIRequest* aRequest,
                               nsresult aStatus) {
   mLoadGroup = nullptr;
 
   if (mTimer) {
     mTimer->Cancel();
     mTimer = nullptr;
   }
 
--- a/dom/base/DOMParser.cpp
+++ b/dom/base/DOMParser.cpp
@@ -203,17 +203,17 @@ already_AddRefed<Document> DOMParser::Pa
 
   if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(status)) {
     rv = listener->OnDataAvailable(parserChannel, nullptr, stream, 0,
                                    aContentLength);
     if (NS_FAILED(rv)) parserChannel->Cancel(rv);
     parserChannel->GetStatus(&status);
   }
 
-  rv = listener->OnStopRequest(parserChannel, nullptr, status);
+  rv = listener->OnStopRequest(parserChannel, status);
   // Failure returned from OnStopRequest does not affect the final status of
   // the channel, so we do not need to call Cancel(rv) as we do above.
 
   if (NS_FAILED(rv)) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -991,23 +991,22 @@ ExternalResourceMap::PendingLoad::OnData
     return NS_BINDING_ABORTED;
   }
   return mTargetListener->OnDataAvailable(aRequest, aContext, aStream, aOffset,
                                           aCount);
 }
 
 NS_IMETHODIMP
 ExternalResourceMap::PendingLoad::OnStopRequest(nsIRequest* aRequest,
-                                                nsISupports* aContext,
                                                 nsresult aStatus) {
   // mTargetListener might be null if SetupViewer or AddExternalResource failed
   if (mTargetListener) {
     nsCOMPtr<nsIStreamListener> listener;
     mTargetListener.swap(listener);
-    return listener->OnStopRequest(aRequest, aContext, aStatus);
+    return listener->OnStopRequest(aRequest, aStatus);
   }
 
   return NS_OK;
 }
 
 nsresult ExternalResourceMap::PendingLoad::StartLoad(nsIURI* aURI,
                                                      nsIURI* aReferrer,
                                                      uint32_t aReferrerPolicy,
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -720,17 +720,17 @@ EventSourceImpl::OnDataAvailable(nsIRequ
   NS_ENSURE_SUCCESS(rv, rv);
 
   uint32_t totalRead;
   return aInputStream->ReadSegments(EventSourceImpl::StreamReaderFunc, this,
                                     aCount, &totalRead);
 }
 
 NS_IMETHODIMP
-EventSourceImpl::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+EventSourceImpl::OnStopRequest(nsIRequest* aRequest,
                                nsresult aStatusCode) {
   AssertIsOnMainThread();
 
   if (IsClosed()) {
     return NS_ERROR_ABORT;
   }
   MOZ_ASSERT(mSrc);
   // "Network errors that prevents the connection from being established in the
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1044,17 +1044,17 @@ BeaconStreamListener::OnStartRequest(nsI
   // release the loadgroup first
   mLoadGroup = nullptr;
 
   aRequest->Cancel(NS_ERROR_NET_INTERRUPT);
   return NS_BINDING_ABORTED;
 }
 
 NS_IMETHODIMP
-BeaconStreamListener::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+BeaconStreamListener::OnStopRequest(nsIRequest* aRequest,
                                     nsresult aStatus) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 BeaconStreamListener::OnDataAvailable(nsIRequest* aRequest, nsISupports* ctxt,
                                       nsIInputStream* inStr,
                                       uint64_t sourceOffset, uint32_t count) {
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -1007,17 +1007,16 @@ nsObjectLoadingContent::OnStartRequest(n
     return NS_ERROR_FAILURE;
   }
 
   return LoadObject(true, false, aRequest);
 }
 
 NS_IMETHODIMP
 nsObjectLoadingContent::OnStopRequest(nsIRequest* aRequest,
-                                      nsISupports* aContext,
                                       nsresult aStatusCode) {
   AUTO_PROFILER_LABEL("nsObjectLoadingContent::OnStopRequest", NETWORK);
 
   // Handle object not loading error because source was a tracking URL (or
   // fingerprinting, cryptomining, etc.).
   // We make a note of this object node by including it in a dedicated
   // array of blocked tracking nodes under its parent document.
   if (UrlClassifierFeatureFactory::IsClassifierBlockingErrorCode(aStatusCode)) {
@@ -1033,17 +1032,17 @@ nsObjectLoadingContent::OnStopRequest(ns
   }
 
   mChannel = nullptr;
 
   if (mFinalListener) {
     // This may re-enter in the case of plugin listeners
     nsCOMPtr<nsIStreamListener> listenerGrip(mFinalListener);
     mFinalListener = nullptr;
-    listenerGrip->OnStopRequest(aRequest, aContext, aStatusCode);
+    listenerGrip->OnStopRequest(aRequest, aStatusCode);
   }
 
   // Return value doesn't matter
   return NS_OK;
 }
 
 // nsIStreamListener
 NS_IMETHODIMP
@@ -2256,17 +2255,17 @@ nsresult nsObjectLoadingContent::CloseCh
     nsCOMPtr<nsIChannel> channelGrip(mChannel);
     nsCOMPtr<nsIStreamListener> listenerGrip(mFinalListener);
     mChannel = nullptr;
     mFinalListener = nullptr;
     channelGrip->Cancel(NS_BINDING_ABORTED);
     if (listenerGrip) {
       // mFinalListener is only set by LoadObject after OnStartRequest, or
       // by OnStartRequest in the case of late-opened plugin streams
-      listenerGrip->OnStopRequest(channelGrip, nullptr, NS_BINDING_ABORTED);
+      listenerGrip->OnStopRequest(channelGrip, NS_BINDING_ABORTED);
     }
   }
   return NS_OK;
 }
 
 nsresult nsObjectLoadingContent::OpenChannel() {
   nsCOMPtr<nsIContent> thisContent =
       do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
--- a/dom/base/nsSyncLoadService.cpp
+++ b/dom/base/nsSyncLoadService.cpp
@@ -96,19 +96,19 @@ nsForceXMLListener::OnStartRequest(nsIRe
   if (channel && NS_SUCCEEDED(status)) {
     channel->SetContentType(NS_LITERAL_CSTRING("text/xml"));
   }
 
   return mListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
-nsForceXMLListener::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+nsForceXMLListener::OnStopRequest(nsIRequest *aRequest,
                                   nsresult aStatusCode) {
-  return mListener->OnStopRequest(aRequest, aContext, aStatusCode);
+  return mListener->OnStopRequest(aRequest, aStatusCode);
 }
 
 nsSyncLoader::~nsSyncLoader() {
   if (mLoading && mChannel) {
     mChannel->Cancel(NS_BINDING_ABORTED);
   }
 }
 
@@ -239,22 +239,22 @@ nsresult nsSyncLoader::PushSyncStream(ns
 }
 
 NS_IMETHODIMP
 nsSyncLoader::OnStartRequest(nsIRequest *aRequest) {
   return mListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
-nsSyncLoader::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+nsSyncLoader::OnStopRequest(nsIRequest *aRequest,
                             nsresult aStatusCode) {
   if (NS_SUCCEEDED(mAsyncLoadStatus) && NS_FAILED(aStatusCode)) {
     mAsyncLoadStatus = aStatusCode;
   }
-  nsresult rv = mListener->OnStopRequest(aRequest, aContext, aStatusCode);
+  nsresult rv = mListener->OnStopRequest(aRequest, aStatusCode);
   if (NS_SUCCEEDED(mAsyncLoadStatus) && NS_FAILED(rv)) {
     mAsyncLoadStatus = rv;
   }
   mLoading = false;
 
   return rv;
 }
 
@@ -352,12 +352,12 @@ nsresult nsSyncLoadService::PushSyncStre
         break;
       }
       sourceOffset += readCount;
     }
   }
   if (NS_FAILED(rv)) {
     aChannel->Cancel(rv);
   }
-  aListener->OnStopRequest(aChannel, nullptr, rv);
+  aListener->OnStopRequest(aChannel, rv);
 
   return rv;
 }
--- a/dom/fetch/FetchDriver.cpp
+++ b/dom/fetch/FetchDriver.cpp
@@ -268,32 +268,31 @@ AlternativeDataStreamListener::OnDataAva
     return mFetchDriver->OnDataAvailable(aRequest, aContext, aInputStream,
                                          aOffset, aCount);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 AlternativeDataStreamListener::OnStopRequest(nsIRequest* aRequest,
-                                             nsISupports* aContext,
                                              nsresult aStatusCode) {
   AssertIsOnMainThread();
 
   // Alternative data loading is going to finish, breaking the reference cycle
   // here by taking the ownership to a loacl variable.
   RefPtr<FetchDriver> fetchDriver = mFetchDriver.forget();
 
   if (mStatus == AlternativeDataStreamListener::CANCELED) {
     // do nothing
     return NS_OK;
   }
 
   if (mStatus == AlternativeDataStreamListener::FALLBACK) {
     MOZ_ASSERT(fetchDriver);
-    return fetchDriver->OnStopRequest(aRequest, aContext, aStatusCode);
+    return fetchDriver->OnStopRequest(aRequest, aStatusCode);
   }
 
   MOZ_DIAGNOSTIC_ASSERT(mStatus == AlternativeDataStreamListener::LOADING);
 
   MOZ_ASSERT(!mAlternativeDataType.IsEmpty() && mPipeAlternativeOutputStream &&
              mPipeAlternativeInputStream);
 
   mPipeAlternativeOutputStream->Close();
@@ -1183,17 +1182,17 @@ FetchDriver::OnDataAvailable(nsIRequest*
   // So we must just assume the pipe is broken.
   if (aRead == 0 && aCount != 0) {
     return NS_BASE_STREAM_CLOSED;
   }
   return rv;
 }
 
 NS_IMETHODIMP
-FetchDriver::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+FetchDriver::OnStopRequest(nsIRequest* aRequest,
                            nsresult aStatusCode) {
   AssertIsOnMainThread();
 
   MOZ_DIAGNOSTIC_ASSERT(!mOnStopRequestCalled);
   mOnStopRequestCalled = true;
 
   // main data loading is going to finish, breaking the reference cycle.
   RefPtr<AlternativeDataStreamListener> altDataListener =
--- a/dom/file/MutableBlobStreamListener.cpp
+++ b/dom/file/MutableBlobStreamListener.cpp
@@ -45,17 +45,16 @@ MutableBlobStreamListener::OnStartReques
   MOZ_ASSERT(mEventTarget);
 
   mStorage = new MutableBlobStorage(mStorageType, mEventTarget);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MutableBlobStreamListener::OnStopRequest(nsIRequest* aRequest,
-                                         nsISupports* aContext,
                                          nsresult aStatus) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mStorage);
 
   // Resetting mStorage to nullptr.
   RefPtr<MutableBlobStorage> storage;
   storage.swap(mStorage);
 
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -694,20 +694,19 @@ HTMLMediaElement::MediaLoadListener::OnS
     rv = NS_BINDING_ABORTED;
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
 HTMLMediaElement::MediaLoadListener::OnStopRequest(nsIRequest* aRequest,
-                                                   nsISupports* aContext,
                                                    nsresult aStatus) {
   if (mNextListener) {
-    return mNextListener->OnStopRequest(aRequest, aContext, aStatus);
+    return mNextListener->OnStopRequest(aRequest, aStatus);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLMediaElement::MediaLoadListener::OnDataAvailable(nsIRequest* aRequest,
                                                      nsISupports* aContext,
                                                      nsIInputStream* aStream,
--- a/dom/html/ImageDocument.cpp
+++ b/dom/html/ImageDocument.cpp
@@ -123,23 +123,23 @@ ImageListener::OnStartRequest(nsIRequest
     imgDoc->mObservingImageLoader = true;
     imageLoader->LoadImageWithChannel(channel, getter_AddRefs(mNextStream));
   }
 
   return MediaDocumentStreamListener::OnStartRequest(request);
 }
 
 NS_IMETHODIMP
-ImageListener::OnStopRequest(nsIRequest* aRequest, nsISupports* aCtxt,
+ImageListener::OnStopRequest(nsIRequest* aRequest,
                              nsresult aStatus) {
   ImageDocument* imgDoc = static_cast<ImageDocument*>(mDocument.get());
   nsContentUtils::DispatchChromeEvent(imgDoc, ToSupports(imgDoc),
                                       NS_LITERAL_STRING("ImageContentLoaded"),
                                       CanBubble::eYes, Cancelable::eYes);
-  return MediaDocumentStreamListener::OnStopRequest(aRequest, aCtxt, aStatus);
+  return MediaDocumentStreamListener::OnStopRequest(aRequest, aStatus);
 }
 
 ImageDocument::ImageDocument()
     : MediaDocument(),
       mVisibleWidth(0.0),
       mVisibleHeight(0.0),
       mImageWidth(0),
       mImageHeight(0),
--- a/dom/html/MediaDocument.cpp
+++ b/dom/html/MediaDocument.cpp
@@ -58,20 +58,20 @@ MediaDocumentStreamListener::OnStartRequ
     return mNextStream->OnStartRequest(request);
   }
 
   return NS_ERROR_PARSED_DATA_CACHED;
 }
 
 NS_IMETHODIMP
 MediaDocumentStreamListener::OnStopRequest(nsIRequest* request,
-                                           nsISupports* ctxt, nsresult status) {
+                                           nsresult status) {
   nsresult rv = NS_OK;
   if (mNextStream) {
-    rv = mNextStream->OnStopRequest(request, ctxt, status);
+    rv = mNextStream->OnStopRequest(request, status);
   }
 
   // Don't release mDocument here if we're in the middle of a multipart
   // response.
   bool lastPart = true;
   nsCOMPtr<nsIMultiPartChannel> mpchan(do_QueryInterface(request));
   if (mpchan) {
     mpchan->GetIsLastPart(&lastPart);
--- a/dom/jsurl/nsJSProtocolHandler.cpp
+++ b/dom/jsurl/nsJSProtocolHandler.cpp
@@ -732,17 +732,17 @@ void nsJSChannel::EvaluateScript() {
 
   } else if (mIsAsync) {
     NotifyListener();
   }
 }
 
 void nsJSChannel::NotifyListener() {
   mListener->OnStartRequest(this);
-  mListener->OnStopRequest(this, nullptr, mStatus);
+  mListener->OnStopRequest(this, mStatus);
 
   CleanupStrongRefs();
 }
 
 void nsJSChannel::CleanupStrongRefs() {
   mListener = nullptr;
   mOriginalInnerWindow = nullptr;
   if (mDocumentOnloadBlockedOn) {
@@ -948,30 +948,30 @@ nsJSChannel::OnDataAvailable(nsIRequest*
                              uint32_t aCount) {
   NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);
 
   return mListener->OnDataAvailable(this, aContext, aInputStream, aOffset,
                                     aCount);
 }
 
 NS_IMETHODIMP
-nsJSChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+nsJSChannel::OnStopRequest(nsIRequest* aRequest,
                            nsresult aStatus) {
   NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);
 
   nsCOMPtr<nsIStreamListener> listener = mListener;
 
   CleanupStrongRefs();
 
   // Make sure aStatus matches what GetStatus() returns
   if (NS_FAILED(mStatus)) {
     aStatus = mStatus;
   }
 
-  nsresult rv = listener->OnStopRequest(this, aContext, aStatus);
+  nsresult rv = listener->OnStopRequest(this, aStatus);
 
   nsCOMPtr<nsILoadGroup> loadGroup;
   mStreamChannel->GetLoadGroup(getter_AddRefs(loadGroup));
   if (loadGroup) {
     loadGroup->RemoveRequest(this, nullptr, mStatus);
   }
 
   mIsActive = false;
--- a/dom/media/ChannelMediaResource.cpp
+++ b/dom/media/ChannelMediaResource.cpp
@@ -55,17 +55,16 @@ NS_IMPL_ISUPPORTS(ChannelMediaResource::
 
 nsresult ChannelMediaResource::Listener::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(NS_IsMainThread());
   if (!mResource) return NS_OK;
   return mResource->OnStartRequest(aRequest, mOffset);
 }
 
 nsresult ChannelMediaResource::Listener::OnStopRequest(nsIRequest* aRequest,
-                                                       nsISupports* aContext,
                                                        nsresult aStatus) {
   MOZ_ASSERT(NS_IsMainThread());
   if (!mResource) return NS_OK;
   return mResource->OnStopRequest(aRequest, aStatus);
 }
 
 nsresult ChannelMediaResource::Listener::OnDataAvailable(
     nsIRequest* aRequest, nsISupports* aContext, nsIInputStream* aStream,
--- a/dom/media/WebVTTListener.cpp
+++ b/dom/media/WebVTTListener.cpp
@@ -79,17 +79,17 @@ WebVTTListener::AsyncOnChannelRedirect(n
 
 NS_IMETHODIMP
 WebVTTListener::OnStartRequest(nsIRequest* aRequest) {
   VTT_LOG("WebVTTListener::OnStartRequest\n");
   return NS_OK;
 }
 
 NS_IMETHODIMP
-WebVTTListener::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+WebVTTListener::OnStopRequest(nsIRequest* aRequest,
                               nsresult aStatus) {
   VTT_LOG("WebVTTListener::OnStopRequest\n");
   if (NS_FAILED(aStatus)) {
     mElement->SetReadyState(TextTrackReadyState::FailedToLoad);
   }
   // Attempt to parse any final data the parser might still have.
   mParserWrapper->Flush();
   if (mElement->ReadyState() != TextTrackReadyState::FailedToLoad) {
--- a/dom/network/TCPSocket.cpp
+++ b/dom/network/TCPSocket.cpp
@@ -319,17 +319,17 @@ class CopierCallbacks final : public nsI
 NS_IMPL_ISUPPORTS(CopierCallbacks, nsIRequestObserver)
 
 NS_IMETHODIMP
 CopierCallbacks::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-CopierCallbacks::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+CopierCallbacks::OnStopRequest(nsIRequest* aRequest,
                                nsresult aStatus) {
   mOwner->NotifyCopyComplete(aStatus);
   mOwner = nullptr;
   return NS_OK;
 }
 }  // unnamed namespace
 
 nsresult TCPSocket::EnsureCopying() {
@@ -989,17 +989,17 @@ TCPSocket::OnDataAvailable(nsIRequest* a
     return NS_ERROR_FAILURE;
   }
   FireDataEvent(cx, NS_LITERAL_STRING("data"), value);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TCPSocket::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+TCPSocket::OnStopRequest(nsIRequest* aRequest,
                          nsresult aStatus) {
   mInputStreamPump = nullptr;
 
   if (mAsyncCopierActive && NS_SUCCEEDED(aStatus)) {
     // If we have some buffered output still, and status is not an
     // error, the other side has done a half-close, but we don't
     // want to be in the close state until we are done sending
     // everything that was buffered. We also don't want to call onclose
--- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp
+++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
@@ -290,20 +290,20 @@ class PluginContextProxy final : public 
 
   NS_IMETHOD
   OnStartRequest(nsIRequest* aRequest) override {
     // Proxy OnStartRequest using the internal context
     return mListener->OnStartRequest(aRequest);
   }
 
   NS_IMETHOD
-  OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+  OnStopRequest(nsIRequest* aRequest,
                 nsresult aStatusCode) override {
     // Proxy OnStopRequest using the inernal context
-    return mListener->OnStopRequest(aRequest, mContext, aStatusCode);
+    return mListener->OnStopRequest(aRequest, aStatusCode);
   }
 
  private:
   ~PluginContextProxy() {}
   nsCOMPtr<nsIStreamListener> mListener;
   nsCOMPtr<nsISupports> mContext;
 };
 
@@ -349,17 +349,16 @@ NS_IMETHODIMP nsPluginStreamListenerPeer
   if (NS_FAILED(rv)) {
     request->Cancel(rv);
   }
 
   return rv;
 }
 
 NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIRequest* request,
-                                                        nsISupports* aContext,
                                                         nsresult aStatus) {
   nsresult rv = NS_OK;
 
   nsCOMPtr<nsIMultiPartChannel> mp = do_QueryInterface(request);
   if (!mp) {
     bool found = mRequests.RemoveObject(request);
     if (!found) {
       NS_ERROR("Received OnStopRequest for untracked request.");
--- a/dom/presentation/PresentationTCPSessionTransport.cpp
+++ b/dom/presentation/PresentationTCPSessionTransport.cpp
@@ -44,17 +44,17 @@ class CopierCallbacks final : public nsI
 NS_IMPL_ISUPPORTS(CopierCallbacks, nsIRequestObserver)
 
 NS_IMETHODIMP
 CopierCallbacks::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-CopierCallbacks::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+CopierCallbacks::OnStopRequest(nsIRequest* aRequest,
                                nsresult aStatus) {
   mOwner->NotifyCopyComplete(aStatus);
   return NS_OK;
 }
 
 NS_IMPL_CYCLE_COLLECTION(PresentationTCPSessionTransport, mTransport,
                          mSocketInputStream, mSocketOutputStream,
                          mInputStreamPump, mInputStreamScriptable, mCallback)
@@ -505,17 +505,16 @@ PresentationTCPSessionTransport::OnInput
 NS_IMETHODIMP
 PresentationTCPSessionTransport::OnStartRequest(nsIRequest* aRequest) {
   // Do nothing.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PresentationTCPSessionTransport::OnStopRequest(nsIRequest* aRequest,
-                                               nsISupports* aContext,
                                                nsresult aStatusCode) {
   PRES_DEBUG("%s:aStatusCode[%" PRIx32 "]\n", __func__,
              static_cast<uint32_t>(aStatusCode));
 
   MOZ_ASSERT(NS_IsMainThread());
 
   mInputStreamPump = nullptr;
 
--- a/dom/security/ContentVerifier.cpp
+++ b/dom/security/ContentVerifier.cpp
@@ -81,17 +81,17 @@ void ContentVerifier::FinishSignature() 
   bool verified = false;
   nsresult rv = NS_OK;
 
   // If the content signature check fails, stop the load
   // and return a signature error. NSS resources are freed by the
   // ContentSignatureVerifier on destruction.
   if (NS_FAILED(mVerifier->End(&verified)) || !verified) {
     CSV_LOG(("failed to verify content\n"));
-    (void)nextListener->OnStopRequest(mContentRequest, mContentContext,
+    (void)nextListener->OnStopRequest(mContentRequest,
                                       NS_ERROR_INVALID_SIGNATURE);
     return;
   }
   CSV_LOG(("Successfully verified content signature.\n"));
 
   // We emptied the input stream so we have to create a new one from mContent
   // to hand it to the consuming listener.
   uint64_t offset = 0;
@@ -106,39 +106,39 @@ void ContentVerifier::FinishSignature() 
                                        offset, mContent[i].Length());
     offset += mContent[i].Length();
     if (NS_FAILED(rv)) {
       break;
     }
   }
 
   // propagate OnStopRequest and return
-  nextListener->OnStopRequest(mContentRequest, mContentContext, rv);
+  nextListener->OnStopRequest(mContentRequest, rv);
 }
 
 NS_IMETHODIMP
 ContentVerifier::OnStartRequest(nsIRequest* aRequest) {
   MOZ_CRASH("This OnStartRequest should've never been called!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
-ContentVerifier::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+ContentVerifier::OnStopRequest(nsIRequest* aRequest,
                                nsresult aStatus) {
   // If we don't have a next listener, we handed off this request already.
   // Return, there's nothing to do here.
   if (!mNextListener) {
     return NS_OK;
   }
 
   if (NS_FAILED(aStatus)) {
     CSV_LOG(("Stream failed\n"));
     nsCOMPtr<nsIStreamListener> nextListener;
     nextListener.swap(mNextListener);
-    return nextListener->OnStopRequest(aRequest, aContext, aStatus);
+    return nextListener->OnStopRequest(aRequest, aStatus);
   }
 
   mContentRead = true;
 
   // If the ContentSignatureVerifier is initialised, finish the verification.
   if (mContextCreated) {
     FinishSignature();
     return aStatus;
@@ -184,17 +184,17 @@ ContentVerifier::ContextCreated(bool suc
     // Make sure that OnStartRequest was called and we have a request.
     MOZ_ASSERT(mContentRequest);
 
     // In this case something went wrong with the cert. Let's stop this load.
     CSV_LOG(("failed to get a valid cert chain\n"));
     if (mContentRequest && nextListener) {
       mContentRequest->Cancel(NS_ERROR_INVALID_SIGNATURE);
       nsresult rv = nextListener->OnStopRequest(
-          mContentRequest, mContentContext, NS_ERROR_INVALID_SIGNATURE);
+          mContentRequest, NS_ERROR_INVALID_SIGNATURE);
       mContentRequest = nullptr;
       mContentContext = nullptr;
       return rv;
     }
 
     // We should never get here!
     MOZ_ASSERT_UNREACHABLE(
         "ContentVerifier was used without getting OnStartRequest!");
--- a/dom/security/nsCSPContext.cpp
+++ b/dom/security/nsCSPContext.cpp
@@ -1601,17 +1601,16 @@ CSPViolationReportListener::OnDataAvaila
   uint32_t read;
   nsCString decodedData;
   return aInputStream->ReadSegments(AppendSegmentToString, &decodedData, aCount,
                                     &read);
 }
 
 NS_IMETHODIMP
 CSPViolationReportListener::OnStopRequest(nsIRequest* aRequest,
-                                          nsISupports* aContext,
                                           nsresult aStatus) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 CSPViolationReportListener::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
--- a/dom/serviceworkers/ServiceWorkerScriptCache.cpp
+++ b/dom/serviceworkers/ServiceWorkerScriptCache.cpp
@@ -838,17 +838,17 @@ nsresult CompareNetwork::SetPrincipalInf
     return rv;
   }
 
   mPrincipalInfo = std::move(principalInfo);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-CompareNetwork::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+CompareNetwork::OnStopRequest(nsIRequest* aRequest,
                               nsresult aStatusCode) {
   // Nothing to do here!
   return NS_OK;
 }
 
 NS_IMETHODIMP
 CompareNetwork::OnStreamComplete(nsIStreamLoader* aLoader,
                                  nsISupports* aContext, nsresult aStatus,
--- a/dom/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/dom/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -824,17 +824,16 @@ NS_IMETHODIMP nsWebBrowserPersist::OnSta
       request->Cancel(NS_BINDING_ABORTED);
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsWebBrowserPersist::OnStopRequest(nsIRequest *request,
-                                                 nsISupports *ctxt,
                                                  nsresult status) {
   nsCOMPtr<nsISupports> keyPtr = do_QueryInterface(request);
   OutputData *data = mOutputMap.Get(keyPtr);
   if (data) {
     if (NS_SUCCEEDED(mPersistResult) && NS_FAILED(status)) {
       SendErrorStatusChange(true, status, request, data->mFile);
     }
 
--- a/dom/workers/ScriptLoader.cpp
+++ b/dom/workers/ScriptLoader.cpp
@@ -530,17 +530,17 @@ class LoaderListener final : public nsIS
   OnStreamComplete(nsIStreamLoader* aLoader, nsISupports* aContext,
                    nsresult aStatus, uint32_t aStringLen,
                    const uint8_t* aString) override;
 
   NS_IMETHOD
   OnStartRequest(nsIRequest* aRequest) override;
 
   NS_IMETHOD
-  OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+  OnStopRequest(nsIRequest* aRequest,
                 nsresult aStatusCode) override {
     // Nothing to do here!
     return NS_OK;
   }
 
  private:
   ~LoaderListener() {}
 
--- a/dom/xbl/nsXBLService.cpp
+++ b/dom/xbl/nsXBLService.cpp
@@ -207,21 +207,21 @@ nsXBLStreamListener::OnStartRequest(nsIR
   // Make sure to add ourselves as a listener after StartDocumentLoad,
   // since that resets the event listners on the document.
   doc->AddEventListener(NS_LITERAL_STRING("load"), this, false);
 
   return mInner->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
-nsXBLStreamListener::OnStopRequest(nsIRequest* request, nsISupports* aCtxt,
+nsXBLStreamListener::OnStopRequest(nsIRequest* request,
                                    nsresult aStatus) {
   nsresult rv = NS_OK;
   if (mInner) {
-    rv = mInner->OnStopRequest(request, aCtxt, aStatus);
+    rv = mInner->OnStopRequest(request, aStatus);
   }
 
   // Don't hold onto the inner listener; holding onto it can create a cycle
   // with the document
   mInner = nullptr;
 
   return rv;
 }
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -2016,17 +2016,17 @@ XMLHttpRequestMainThread::OnStartRequest
   if (NS_SUCCEEDED(rv) && HasListenersFor(nsGkAtoms::onprogress)) {
     StartProgressEventTimer();
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-XMLHttpRequestMainThread::OnStopRequest(nsIRequest* request, nsISupports* ctxt,
+XMLHttpRequestMainThread::OnStopRequest(nsIRequest* request,
                                         nsresult status) {
   AUTO_PROFILER_LABEL("XMLHttpRequestMainThread::OnStopRequest", NETWORK);
 
   if (request != mChannel) {
     // Can this still happen?
     return NS_OK;
   }
 
@@ -2039,31 +2039,31 @@ XMLHttpRequestMainThread::OnStopRequest(
     AppendToResponseText(Span<const uint8_t>(), true);
   }
 
   mWaitingForOnStopRequest = false;
 
   if (mRequestObserver) {
     NS_ASSERTION(mFirstStartRequestSeen, "Inconsistent state!");
     mFirstStartRequestSeen = false;
-    mRequestObserver->OnStopRequest(request, ctxt, status);
+    mRequestObserver->OnStopRequest(request, status);
   }
 
   // make sure to notify the listener if we were aborted
   // XXX in fact, why don't we do the cleanup below in this case??
   // UNSENT is for abort calls.  See OnStartRequest above.
   if (mState == XMLHttpRequest_Binding::UNSENT || mFlagTimedOut) {
     if (mXMLParserStreamListener)
-      (void)mXMLParserStreamListener->OnStopRequest(request, ctxt, status);
+      (void)mXMLParserStreamListener->OnStopRequest(request, status);
     return NS_OK;
   }
 
   // Is this good enough here?
   if (mXMLParserStreamListener && mFlagParseBody) {
-    mXMLParserStreamListener->OnStopRequest(request, ctxt, status);
+    mXMLParserStreamListener->OnStopRequest(request, status);
   }
 
   mXMLParserStreamListener = nullptr;
   mContext = nullptr;
 
   // If window.stop() or other aborts were issued, handle as an abort
   if (status == NS_BINDING_ABORTED) {
     mFlagParseBody = false;
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -264,17 +264,17 @@ txStylesheetSink::OnStartRequest(nsIRequ
       }
     }
   }
 
   return mListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
-txStylesheetSink::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+txStylesheetSink::OnStopRequest(nsIRequest* aRequest,
                                 nsresult aStatusCode) {
   bool success = true;
 
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest);
   if (httpChannel) {
     Unused << httpChannel->GetRequestSucceeded(&success);
   }
 
@@ -294,17 +294,17 @@ txStylesheetSink::OnStopRequest(nsIReque
 
   if (NS_FAILED(result)) {
     nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
     nsAutoString spec;
     getSpec(channel, spec);
     mCompiler->cancel(result, nullptr, spec.get());
   }
 
-  nsresult rv = mListener->OnStopRequest(aRequest, mParser, aStatusCode);
+  nsresult rv = mListener->OnStopRequest(aRequest, aStatusCode);
   mListener = nullptr;
   mParser = nullptr;
   return rv;
 }
 
 NS_IMETHODIMP
 txStylesheetSink::GetInterface(const nsIID& aIID, void** aResult) {
   if (aIID.Equals(NS_GET_IID(nsIAuthPrompt))) {
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -1374,17 +1374,16 @@ NS_IMPL_ISUPPORTS(XULDocument::CachedChr
 
 NS_IMETHODIMP
 XULDocument::CachedChromeStreamListener::OnStartRequest(nsIRequest* request) {
   return NS_ERROR_PARSED_DATA_CACHED;
 }
 
 NS_IMETHODIMP
 XULDocument::CachedChromeStreamListener::OnStopRequest(nsIRequest* request,
-                                                       nsISupports* aContext,
                                                        nsresult aStatus) {
   if (!mProtoLoaded) return NS_OK;
 
   return mDocument->OnPrototypeLoadDone(true);
 }
 
 NS_IMETHODIMP
 XULDocument::CachedChromeStreamListener::OnDataAvailable(nsIRequest* request,
--- a/extensions/pref/autoconfig/src/nsAutoConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsAutoConfig.cpp
@@ -80,17 +80,17 @@ nsAutoConfig::OnDataAvailable(nsIRequest
     if (NS_FAILED(rv)) return rv;
     mBuf.Append(buf, amt);
     aLength -= amt;
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsAutoConfig::OnStopRequest(nsIRequest *request, nsISupports *context,
+nsAutoConfig::OnStopRequest(nsIRequest *request,
                             nsresult aStatus) {
   nsresult rv;
 
   // If the request is failed, go read the failover.jsc file
   if (NS_FAILED(aStatus)) {
     MOZ_LOG(MCD, LogLevel::Debug,
             ("mcd request failed with status %" PRIx32 "\n",
              static_cast<uint32_t>(aStatus)));
--- a/gfx/thebes/gfxSVGGlyphs.cpp
+++ b/gfx/thebes/gfxSVGGlyphs.cpp
@@ -373,17 +373,17 @@ nsresult gfxSVGGlyphsDocument::ParseDocu
     rv = listener->OnDataAvailable(channel, nullptr /* aContext */, stream, 0,
                                    aBufLen);
     if (NS_FAILED(rv)) {
       channel->Cancel(rv);
     }
     channel->GetStatus(&status);
   }
 
-  rv = listener->OnStopRequest(channel, nullptr /* aContext */, status);
+  rv = listener->OnStopRequest(channel, status);
   NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
 
   document.swap(mDocument);
 
   return NS_OK;
 }
 
 void gfxSVGGlyphsDocument::InsertGlyphId(Element *aGlyphElement) {
--- a/image/SVGDocumentWrapper.cpp
+++ b/image/SVGDocumentWrapper.cpp
@@ -210,20 +210,20 @@ SVGDocumentWrapper::OnStartRequest(nsIRe
     if (NS_SUCCEEDED(rv)) {
       rv = mViewer->Open(nullptr, nullptr);
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP
-SVGDocumentWrapper::OnStopRequest(nsIRequest* aRequest, nsISupports* ctxt,
+SVGDocumentWrapper::OnStopRequest(nsIRequest* aRequest,
                                   nsresult status) {
   if (mListener) {
-    mListener->OnStopRequest(aRequest, ctxt, status);
+    mListener->OnStopRequest(aRequest, status);
     mListener = nullptr;
   }
 
   return NS_OK;
 }
 
 /** nsIObserver Methods **/
 NS_IMETHODIMP
--- a/image/VectorImage.cpp
+++ b/image/VectorImage.cpp
@@ -420,17 +420,17 @@ void VectorImage::CollectSizeOfSurfaces(
   SurfaceCache::CollectSizeOfSurfaces(ImageKey(this), aCounters, aMallocSizeOf);
 }
 
 nsresult VectorImage::OnImageDataComplete(nsIRequest* aRequest,
                                           nsISupports* aContext,
                                           nsresult aStatus, bool aLastPart) {
   // Call our internal OnStopRequest method, which only talks to our embedded
   // SVG document. This won't have any effect on our ProgressTracker.
-  nsresult finalStatus = OnStopRequest(aRequest, aContext, aStatus);
+  nsresult finalStatus = OnStopRequest(aRequest, aStatus);
 
   // Give precedence to Necko failure codes.
   if (NS_FAILED(aStatus)) {
     finalStatus = aStatus;
   }
 
   Progress loadProgress = LoadCompleteProgress(aLastPart, mError, finalStatus);
 
@@ -1362,23 +1362,23 @@ VectorImage::OnStartRequest(nsIRequest* 
   mLoadEventListener = new SVGLoadEventListener(document, this);
   mParseCompleteListener = new SVGParseCompleteListener(document, this);
 
   return NS_OK;
 }
 
 //******************************************************************************
 NS_IMETHODIMP
-VectorImage::OnStopRequest(nsIRequest* aRequest, nsISupports* aCtxt,
+VectorImage::OnStopRequest(nsIRequest* aRequest,
                            nsresult aStatus) {
   if (mError) {
     return NS_ERROR_FAILURE;
   }
 
-  return mSVGDocumentWrapper->OnStopRequest(aRequest, aCtxt, aStatus);
+  return mSVGDocumentWrapper->OnStopRequest(aRequest, aStatus);
 }
 
 void VectorImage::OnSVGDocumentParsed() {
   MOZ_ASSERT(mParseCompleteListener, "Should have the parse complete listener");
   MOZ_ASSERT(mLoadEventListener, "Should have the load event listener");
 
   if (!mSVGDocumentWrapper->GetRootSVGElem()) {
     // This is an invalid SVG document. It may have failed to parse, or it may
--- a/image/decoders/icon/mac/nsIconChannelCocoa.mm
+++ b/image/decoders/icon/mac/nsIconChannelCocoa.mm
@@ -77,19 +77,19 @@ NS_IMETHODIMP
 nsIconChannel::OnStartRequest(nsIRequest* aRequest) {
   if (mListener) {
     return mListener->OnStartRequest(this);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsIconChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext, nsresult aStatus) {
+nsIconChannel::OnStopRequest(nsIRequest* aRequest, nsresult aStatus) {
   if (mListener) {
-    mListener->OnStopRequest(this, aContext, aStatus);
+    mListener->OnStopRequest(this, aStatus);
     mListener = nullptr;
   }
 
   // Remove from load group
   if (mLoadGroup) {
     mLoadGroup->RemoveRequest(this, nullptr, aStatus);
   }
 
--- a/image/decoders/icon/win/nsIconChannel.cpp
+++ b/image/decoders/icon/win/nsIconChannel.cpp
@@ -709,20 +709,20 @@ nsIconChannel::GetSecurityInfo(nsISuppor
 NS_IMETHODIMP nsIconChannel::OnStartRequest(nsIRequest* aRequest) {
   if (mListener) {
     return mListener->OnStartRequest(this);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsIconChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+nsIconChannel::OnStopRequest(nsIRequest* aRequest,
                              nsresult aStatus) {
   if (mListener) {
-    mListener->OnStopRequest(this, aContext, aStatus);
+    mListener->OnStopRequest(this, aStatus);
     mListener = nullptr;
   }
 
   // Remove from load group
   if (mLoadGroup) {
     mLoadGroup->RemoveRequest(this, nullptr, aStatus);
   }
 
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -2685,23 +2685,23 @@ ProxyListener::OnStartRequest(nsIRequest
       }
     }
   }
 
   return mDestListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
-ProxyListener::OnStopRequest(nsIRequest* aRequest, nsISupports* ctxt,
+ProxyListener::OnStopRequest(nsIRequest* aRequest,
                              nsresult status) {
   if (!mDestListener) {
     return NS_ERROR_FAILURE;
   }
 
-  return mDestListener->OnStopRequest(aRequest, ctxt, status);
+  return mDestListener->OnStopRequest(aRequest, status);
 }
 
 /** nsIStreamListener methods **/
 
 NS_IMETHODIMP
 ProxyListener::OnDataAvailable(nsIRequest* aRequest, nsISupports* ctxt,
                                nsIInputStream* inStr, uint64_t sourceOffset,
                                uint32_t count) {
@@ -2911,26 +2911,26 @@ imgCacheValidator::OnStartRequest(nsIReq
   // the cache before the proxies' ownership changes, because adding a proxy
   // changes the caching behaviour for imgRequests.
   mImgLoader->PutIntoCache(mNewRequest->CacheKey(), mNewEntry);
   UpdateProxies(/* aCancelRequest */ false, /* aSyncNotify */ true);
   return mDestListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
-imgCacheValidator::OnStopRequest(nsIRequest* aRequest, nsISupports* ctxt,
+imgCacheValidator::OnStopRequest(nsIRequest* aRequest,
                                  nsresult status) {
   // Be sure we've released the document that we may have been holding on to.
   mContext = nullptr;
 
   if (!mDestListener) {
     return NS_OK;
   }
 
-  return mDestListener->OnStopRequest(aRequest, ctxt, status);
+  return mDestListener->OnStopRequest(aRequest, status);
 }
 
 /** nsIStreamListener methods **/
 
 NS_IMETHODIMP
 imgCacheValidator::OnDataAvailable(nsIRequest* aRequest, nsISupports* ctxt,
                                    nsIInputStream* inStr, uint64_t sourceOffset,
                                    uint32_t count) {
--- a/image/imgRequest.cpp
+++ b/image/imgRequest.cpp
@@ -730,27 +730,27 @@ imgRequest::OnStartRequest(nsIRequest* a
              this, static_cast<uint32_t>(rv),
              NS_SUCCEEDED(rv) ? "succeeded" : "failed"));
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-imgRequest::OnStopRequest(nsIRequest* aRequest, nsISupports* ctxt,
+imgRequest::OnStopRequest(nsIRequest* aRequest,
                           nsresult status) {
   LOG_FUNC(gImgLog, "imgRequest::OnStopRequest");
   MOZ_ASSERT(NS_IsMainThread(), "Can't send notifications off-main-thread");
 
   RefPtr<Image> image = GetImage();
 
   RefPtr<imgRequest> strongThis = this;
 
   if (mIsMultiPartChannel && mNewPartPending) {
-    OnDataAvailable(aRequest, ctxt, nullptr, 0, 0);
+    OnDataAvailable(aRequest, nullptr, nullptr, 0, 0);
   }
 
   // XXXldb What if this is a non-last part of a multipart request?
   // xxx before we release our reference to mRequest, lets
   // save the last status that we saw so that the
   // imgRequestProxy will have access to it.
   if (mRequest) {
     mRequest = nullptr;  // we no longer need the request
@@ -774,17 +774,17 @@ imgRequest::OnStopRequest(nsIRequest* aR
     isPartial = true;
     status = NS_OK;  // fake happy face
   }
 
   // Tell the image that it has all of the source data. Note that this can
   // trigger a failure, since the image might be waiting for more non-optional
   // data and this is the point where we break the news that it's not coming.
   if (image) {
-    nsresult rv = image->OnImageDataComplete(aRequest, ctxt, status, lastPart);
+    nsresult rv = image->OnImageDataComplete(aRequest, nullptr, status, lastPart);
 
     // If we got an error in the OnImageDataComplete() call, we don't want to
     // proceed as if nothing bad happened. However, we also want to give
     // precedence to failure status codes from necko, since presumably they're
     // more meaningful.
     if (NS_FAILED(rv) && NS_SUCCEEDED(status)) {
       status = rv;
     }
--- a/layout/style/StreamLoader.cpp
+++ b/layout/style/StreamLoader.cpp
@@ -42,17 +42,17 @@ StreamLoader::OnStartRequest(nsIRequest*
         return (mStatus = NS_ERROR_OUT_OF_MEMORY);
       }
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-StreamLoader::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+StreamLoader::OnStopRequest(nsIRequest* aRequest,
                             nsresult aStatus) {
   // Decoded data
   nsCString utf8String;
   {
     // Hold the nsStringBuffer for the bytes from the stack to ensure release
     // no matter which return branch is taken.
     nsCString bytes(mBytes);
     mBytes.Truncate();
--- a/layout/style/nsFontFaceLoader.cpp
+++ b/layout/style/nsFontFaceLoader.cpp
@@ -305,17 +305,17 @@ nsFontFaceLoader::OnStartRequest(nsIRequ
     nsCOMPtr<nsIEventTarget> sts =
         do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID);
     Unused << NS_WARN_IF(NS_FAILED(req->RetargetDeliveryTo(sts)));
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsFontFaceLoader::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+nsFontFaceLoader::OnStopRequest(nsIRequest* aRequest,
                                 nsresult aStatusCode) {
   MOZ_ASSERT(NS_IsMainThread());
   DropChannel();
   return NS_OK;
 }
 
 void nsFontFaceLoader::Cancel() {
   MOZ_DIAGNOSTIC_ASSERT(!mInLoadTimerCallback);
--- a/media/mtransport/ipc/WebrtcProxyChannel.cpp
+++ b/media/mtransport/ipc/WebrtcProxyChannel.cpp
@@ -333,17 +333,17 @@ WebrtcProxyChannel::OnTransportAvailable
 NS_IMETHODIMP
 WebrtcProxyChannel::OnStartRequest(nsIRequest* aRequest) {
   LOG(("WebrtcProxyChannel::OnStartRequest %p\n", this));
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-WebrtcProxyChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+WebrtcProxyChannel::OnStopRequest(nsIRequest* aRequest,
                                   nsresult aStatusCode) {
   LOG(("WebrtcProxyChannel::OnStopRequest %p status=%u\n", this,
        static_cast<uint32_t>(aStatusCode)));
 
   // see nsHttpChannel::ProcessFailedProxyConnect for most error codes
   if (NS_FAILED(aStatusCode)) {
     CloseWithReason(aStatusCode);
     return aStatusCode;
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -525,17 +525,17 @@ nsresult nsJARChannel::CheckPendingEvent
 }
 
 void nsJARChannel::NotifyError(nsresult aError) {
   MOZ_ASSERT(NS_FAILED(aError));
 
   mStatus = aError;
 
   OnStartRequest(nullptr);
-  OnStopRequest(nullptr, nullptr, aError);
+  OnStopRequest(nullptr, aError);
 }
 
 void nsJARChannel::FireOnProgress(uint64_t aProgress) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mProgressSink);
 
   mProgressSink->OnProgress(this, nullptr, aProgress, mContentLength);
 }
@@ -1011,25 +1011,25 @@ nsJARChannel::OnStartRequest(nsIRequest 
           NS_ConvertUTF8toUTF16(contentType))) {
     return NS_ERROR_CORRUPTED_CONTENT;
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
-nsJARChannel::OnStopRequest(nsIRequest *req, nsISupports *ctx,
+nsJARChannel::OnStopRequest(nsIRequest *req,
                             nsresult status) {
   LOG(("nsJARChannel::OnStopRequest [this=%p %s status=%" PRIx32 "]\n", this,
        mSpec.get(), static_cast<uint32_t>(status)));
 
   if (NS_SUCCEEDED(mStatus)) mStatus = status;
 
   if (mListener) {
-    mListener->OnStopRequest(this, nullptr, status);
+    mListener->OnStopRequest(this, status);
     mListener = nullptr;
   }
 
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, status);
 
   mPump = nullptr;
   mIsPending = false;
 
--- a/modules/libjar/zipwriter/nsDeflateConverter.cpp
+++ b/modules/libjar/zipwriter/nsDeflateConverter.cpp
@@ -127,32 +127,31 @@ NS_IMETHODIMP nsDeflateConverter::OnData
 
 NS_IMETHODIMP nsDeflateConverter::OnStartRequest(nsIRequest *aRequest) {
   if (!mListener) return NS_ERROR_NOT_INITIALIZED;
 
   return mListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP nsDeflateConverter::OnStopRequest(nsIRequest *aRequest,
-                                                nsISupports *aContext,
                                                 nsresult aStatusCode) {
   if (!mListener) return NS_ERROR_NOT_INITIALIZED;
 
   nsresult rv;
 
   int zerr;
   do {
     zerr = deflate(&mZstream, Z_FINISH);
-    rv = PushAvailableData(aRequest, aContext);
+    rv = PushAvailableData(aRequest, nullptr);
     NS_ENSURE_SUCCESS(rv, rv);
   } while (zerr == Z_OK);
 
   deflateEnd(&mZstream);
 
-  return mListener->OnStopRequest(aRequest, mContext, aStatusCode);
+  return mListener->OnStopRequest(aRequest, aStatusCode);
 }
 
 nsresult nsDeflateConverter::PushAvailableData(nsIRequest *aRequest,
                                                nsISupports *aContext) {
   uint32_t bytesToWrite = sizeof(mWriteBuffer) - mZstream.avail_out;
   // We don't need to do anything if there isn't any data
   if (bytesToWrite == 0) return NS_OK;
 
--- a/modules/libjar/zipwriter/nsZipDataStream.cpp
+++ b/modules/libjar/zipwriter/nsZipDataStream.cpp
@@ -73,21 +73,20 @@ NS_IMETHODIMP nsZipDataStream::OnDataAva
 
 NS_IMETHODIMP nsZipDataStream::OnStartRequest(nsIRequest *aRequest) {
   if (!mOutput) return NS_ERROR_NOT_INITIALIZED;
 
   return mOutput->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP nsZipDataStream::OnStopRequest(nsIRequest *aRequest,
-                                             nsISupports *aContext,
                                              nsresult aStatusCode) {
   if (!mOutput) return NS_ERROR_NOT_INITIALIZED;
 
-  nsresult rv = mOutput->OnStopRequest(aRequest, aContext, aStatusCode);
+  nsresult rv = mOutput->OnStopRequest(aRequest, aStatusCode);
   mOutput = nullptr;
   if (NS_FAILED(rv)) {
     mWriter->EntryCompleteCallback(mHeader, rv);
   } else {
     rv = CompleteEntry();
     rv = mWriter->EntryCompleteCallback(mHeader, rv);
   }
 
@@ -137,24 +136,24 @@ nsresult nsZipDataStream::ReadStream(nsI
   auto buffer = MakeUnique<char[]>(4096);
   NS_ENSURE_TRUE(buffer, NS_ERROR_OUT_OF_MEMORY);
 
   uint32_t read = 0;
   uint32_t offset = 0;
   do {
     rv = aStream->Read(buffer.get(), 4096, &read);
     if (NS_FAILED(rv)) {
-      OnStopRequest(nullptr, nullptr, rv);
+      OnStopRequest(nullptr, rv);
       return rv;
     }
 
     if (read > 0) {
       rv = ProcessData(nullptr, nullptr, buffer.get(), offset, read);
       if (NS_FAILED(rv)) {
-        OnStopRequest(nullptr, nullptr, rv);
+        OnStopRequest(nullptr, rv);
         return rv;
       }
       offset += read;
     }
   } while (read > 0);
 
-  return OnStopRequest(nullptr, nullptr, NS_OK);
+  return OnStopRequest(nullptr, NS_OK);
 }
--- a/modules/libjar/zipwriter/nsZipWriter.cpp
+++ b/modules/libjar/zipwriter/nsZipWriter.cpp
@@ -620,17 +620,16 @@ NS_IMETHODIMP nsZipWriter::Close() {
 }
 
 // Our nsIRequestObserver monitors removal operations performed on the queue
 NS_IMETHODIMP nsZipWriter::OnStartRequest(nsIRequest *aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsZipWriter::OnStopRequest(nsIRequest *aRequest,
-                                         nsISupports *aContext,
                                          nsresult aStatusCode) {
   if (NS_FAILED(aStatusCode)) {
     FinishQueue(aStatusCode);
     Cleanup();
   }
 
   nsresult rv = mStream->Flush();
   if (NS_FAILED(rv)) {
@@ -1025,17 +1024,16 @@ void nsZipWriter::BeginProcessingNextIte
   FinishQueue(NS_OK);
 }
 
 /*
  * Ends processing with the given status.
  */
 void nsZipWriter::FinishQueue(nsresult aStatus) {
   nsCOMPtr<nsIRequestObserver> observer = mProcessObserver;
-  nsCOMPtr<nsISupports> context = mProcessContext;
   // Clean up everything first in case the observer decides to queue more
   // things
   mProcessObserver = nullptr;
   mProcessContext = nullptr;
   mInQueue = false;
 
-  if (observer) observer->OnStopRequest(nullptr, context, aStatus);
+  if (observer) observer->OnStopRequest(nullptr, aStatus);
 }
--- a/netwerk/base/BackgroundFileSaver.cpp
+++ b/netwerk/base/BackgroundFileSaver.cpp
@@ -969,17 +969,16 @@ NS_IMETHODIMP
 BackgroundFileSaverStreamListener::OnStartRequest(nsIRequest *aRequest) {
   NS_ENSURE_ARG(aRequest);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 BackgroundFileSaverStreamListener::OnStopRequest(nsIRequest *aRequest,
-                                                 nsISupports *aContext,
                                                  nsresult aStatusCode) {
   // If an error occurred, cancel the operation immediately.  On success, wait
   // until the caller has determined whether the file should be renamed.
   if (NS_FAILED(aStatusCode)) {
     Finish(aStatusCode);
   }
 
   return NS_OK;
--- a/netwerk/base/MemoryDownloader.cpp
+++ b/netwerk/base/MemoryDownloader.cpp
@@ -20,25 +20,25 @@ NS_IMETHODIMP
 MemoryDownloader::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(!mData);
   mData.reset(new FallibleTArray<uint8_t>());
   mStatus = NS_OK;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-MemoryDownloader::OnStopRequest(nsIRequest* aRequest, nsISupports* aCtxt,
+MemoryDownloader::OnStopRequest(nsIRequest* aRequest,
                                 nsresult aStatus) {
   MOZ_ASSERT_IF(NS_FAILED(mStatus), NS_FAILED(aStatus));
   MOZ_ASSERT(!mData == NS_FAILED(mStatus));
   Data data;
   data.swap(mData);
   RefPtr<IObserver> observer;
   observer.swap(mObserver);
-  observer->OnDownloadComplete(this, aRequest, aCtxt, aStatus, std::move(data));
+  observer->OnDownloadComplete(this, aRequest, nullptr, aStatus, std::move(data));
   return NS_OK;
 }
 
 nsresult MemoryDownloader::ConsumeData(nsIInputStream* aIn, void* aClosure,
                                        const char* aFromRawSegment,
                                        uint32_t aToOffset, uint32_t aCount,
                                        uint32_t* aWriteCount) {
   MemoryDownloader* self = static_cast<MemoryDownloader*>(aClosure);
--- a/netwerk/base/NetworkConnectivityService.cpp
+++ b/netwerk/base/NetworkConnectivityService.cpp
@@ -252,17 +252,16 @@ NetworkConnectivityService::RecheckIPCon
 
 NS_IMETHODIMP
 NetworkConnectivityService::OnStartRequest(nsIRequest *aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 NetworkConnectivityService::OnStopRequest(nsIRequest *aRequest,
-                                          nsISupports *aContext,
                                           nsresult aStatusCode) {
   if (aStatusCode == NS_ERROR_ABORT) {
     return NS_OK;
   }
 
   ConnectivityState status = NS_FAILED(aStatusCode) ? NOT_AVAILABLE : OK;
 
   if (aRequest == mIPv4Channel) {
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -2324,17 +2324,16 @@ NS_IMPL_ISUPPORTS(Predictor::PrefetchLis
 NS_IMETHODIMP
 Predictor::PrefetchListener::OnStartRequest(nsIRequest *aRequest) {
   mStartTime = TimeStamp::Now();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 Predictor::PrefetchListener::OnStopRequest(nsIRequest *aRequest,
-                                           nsISupports *aContext,
                                            nsresult aStatusCode) {
   PREDICTOR_LOG(("OnStopRequest this=%p aStatusCode=0x%" PRIX32, this,
                  static_cast<uint32_t>(aStatusCode)));
   NS_ENSURE_ARG(aRequest);
   if (NS_FAILED(aStatusCode)) {
     return aStatusCode;
   }
   Telemetry::AccumulateTimeDelta(Telemetry::PREDICTOR_PREFETCH_TIME,
--- a/netwerk/base/SimpleChannelParent.cpp
+++ b/netwerk/base/SimpleChannelParent.cpp
@@ -80,17 +80,17 @@ NS_IMETHODIMP
 SimpleChannelParent::OnStartRequest(nsIRequest* aRequest) {
   // We don't have a way to prevent nsBaseChannel from calling AsyncOpen on
   // the created nsSimpleChannel. We don't have anywhere to send the data in the
   // parent, so abort the binding.
   return NS_BINDING_ABORTED;
 }
 
 NS_IMETHODIMP
-SimpleChannelParent::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+SimpleChannelParent::OnStopRequest(nsIRequest* aRequest,
                                    nsresult aStatusCode) {
   // See above.
   MOZ_ASSERT(NS_FAILED(aStatusCode));
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SimpleChannelParent::OnDataAvailable(nsIRequest* aRequest,
--- a/netwerk/base/nsAsyncStreamCopier.cpp
+++ b/netwerk/base/nsAsyncStreamCopier.cpp
@@ -107,17 +107,17 @@ void nsAsyncStreamCopier::Complete(nsres
       observer = mObserver;
       mObserver = nullptr;
     }
   }
 
   if (observer) {
     LOG(("  calling OnStopRequest [status=%" PRIx32 "]\n",
          static_cast<uint32_t>(status)));
-    observer->OnStopRequest(AsRequest(), ctx, status);
+    observer->OnStopRequest(AsRequest(), status);
   }
 }
 
 void nsAsyncStreamCopier::OnAsyncCopyComplete(void *closure, nsresult status) {
   nsAsyncStreamCopier *self = (nsAsyncStreamCopier *)closure;
   self->Complete(status);
   NS_RELEASE(self);  // addref'd in AsyncCopy
 }
--- a/netwerk/base/nsBaseChannel.cpp
+++ b/netwerk/base/nsBaseChannel.cpp
@@ -277,17 +277,17 @@ void nsBaseChannel::HandleAsyncRedirect(
 void nsBaseChannel::ContinueHandleAsyncRedirect(nsresult result) {
   mWaitingOnAsyncRedirect = false;
 
   if (NS_FAILED(result)) Cancel(result);
 
   if (NS_FAILED(result) && mListener) {
     // Notify our consumer ourselves
     mListener->OnStartRequest(this);
-    mListener->OnStopRequest(this, nullptr, mStatus);
+    mListener->OnStopRequest(this, mStatus);
     ChannelDone();
   }
 
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
 
   // Drop notification callbacks to prevent cycles.
   mCallbacks = nullptr;
   CallbacksChanged();
@@ -760,29 +760,29 @@ nsBaseChannel::OnStartRequest(nsIRequest
   SUSPEND_PUMP_FOR_SCOPE();
 
   if (mListener)  // null in case of redirect
     return mListener->OnStartRequest(this);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsBaseChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
+nsBaseChannel::OnStopRequest(nsIRequest *request,
                              nsresult status) {
   // If both mStatus and status are failure codes, we keep mStatus as-is since
   // that is consistent with our GetStatus and Cancel methods.
   if (NS_SUCCEEDED(mStatus)) mStatus = status;
 
   // Cause Pending to return false.
   mPump = nullptr;
   mRequest = nullptr;
   mPumpingData = false;
 
   if (mListener)  // null in case of redirect
-    mListener->OnStopRequest(this, nullptr, mStatus);
+    mListener->OnStopRequest(this, mStatus);
   ChannelDone();
 
   // No need to suspend pump in this scope since we will not be receiving
   // any more events from it.
 
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
 
   // Drop notification callbacks to prevent cycles.
--- a/netwerk/base/nsDownloader.cpp
+++ b/netwerk/base/nsDownloader.cpp
@@ -62,24 +62,24 @@ nsDownloader::OnStartRequest(nsIRequest 
   // we could wrap this output stream with a buffered output stream,
   // but it shouldn't be necessary since we will be writing large
   // chunks given to us via OnDataAvailable.
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDownloader::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
+nsDownloader::OnStopRequest(nsIRequest *request,
                             nsresult status) {
   if (mSink) {
     mSink->Close();
     mSink = nullptr;
   }
 
-  mObserver->OnDownloadComplete(this, request, ctxt, status, mLocation);
+  mObserver->OnDownloadComplete(this, request, nullptr, status, mLocation);
   mObserver = nullptr;
 
   return NS_OK;
 }
 
 nsresult nsDownloader::ConsumeData(nsIInputStream *in, void *closure,
                                    const char *fromRawSegment,
                                    uint32_t toOffset, uint32_t count,
--- a/netwerk/base/nsIRequestObserver.idl
+++ b/netwerk/base/nsIRequestObserver.idl
@@ -23,17 +23,15 @@ interface nsIRequestObserver : nsISuppor
      */
     void onStartRequest(in nsIRequest aRequest);
 
     /**
      * Called to signify the end of an asynchronous request.  This
      * call is always preceded by a call to onStartRequest.
      *
      * @param aRequest request being observed
-     * @param aContext user defined context
      * @param aStatusCode reason for stopping (NS_OK if completed successfully)
      *
      * An exception thrown from onStopRequest is generally ignored.
      */
     void onStopRequest(in nsIRequest aRequest,
-                       in nsISupports aContext,
                        in nsresult aStatusCode);
 };
--- a/netwerk/base/nsIncrementalDownload.cpp
+++ b/netwerk/base/nsIncrementalDownload.cpp
@@ -189,17 +189,17 @@ void nsIncrementalDownload::CallOnStopRe
   if (!mObserver) return;
 
   // Ensure that OnStartRequest is always called once before OnStopRequest.
   nsresult rv = CallOnStartRequest();
   if (NS_SUCCEEDED(mStatus)) mStatus = rv;
 
   mIsPending = false;
 
-  mObserver->OnStopRequest(this, mObserverContext, mStatus);
+  mObserver->OnStopRequest(this, mStatus);
   mObserver = nullptr;
   mObserverContext = nullptr;
 }
 
 nsresult nsIncrementalDownload::StartTimer(int32_t interval) {
   return NS_NewTimerWithObserver(getter_AddRefs(mTimer), this, interval * 1000,
                                  nsITimer::TYPE_ONE_SHOT);
 }
@@ -632,17 +632,17 @@ nsIncrementalDownload::OnStartRequest(ns
 
   mChunk = mozilla::MakeUniqueFallible<char[]>(mChunkSize);
   if (!mChunk) rv = NS_ERROR_OUT_OF_MEMORY;
 
   return rv;
 }
 
 NS_IMETHODIMP
-nsIncrementalDownload::OnStopRequest(nsIRequest *request, nsISupports *context,
+nsIncrementalDownload::OnStopRequest(nsIRequest *request,
                                      nsresult status) {
   // Not a real error; just a trick to kill off the channel without our
   // listener having to care.
   if (status == NS_ERROR_DOWNLOAD_NOT_PARTIAL) return NS_OK;
 
   // Not a real error; just a trick used to suppress OnDataAvailable calls.
   if (status == NS_ERROR_DOWNLOAD_COMPLETE) status = NS_OK;
 
--- a/netwerk/base/nsIncrementalStreamLoader.cpp
+++ b/netwerk/base/nsIncrementalStreamLoader.cpp
@@ -71,17 +71,17 @@ nsIncrementalStreamLoader::OnStartReques
         return NS_ERROR_OUT_OF_MEMORY;
       }
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsIncrementalStreamLoader::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
+nsIncrementalStreamLoader::OnStopRequest(nsIRequest *request,
                                          nsresult aStatus) {
   AUTO_PROFILER_LABEL("nsIncrementalStreamLoader::OnStopRequest", NETWORK);
 
   if (mObserver) {
     // provide nsIIncrementalStreamLoader::request during call to
     // OnStreamComplete
     mRequest = request;
     size_t length = mData.length();
@@ -92,17 +92,16 @@ nsIncrementalStreamLoader::OnStopRequest
       // The observer didn't take ownership of the extracted data buffer, so
       // put it back into mData.
       mData.replaceRawBuffer(elems, length);
     }
     // done.. cleanup
     ReleaseData();
     mRequest = nullptr;
     mObserver = nullptr;
-    mContext = nullptr;
   }
   return NS_OK;
 }
 
 nsresult nsIncrementalStreamLoader::WriteSegmentFun(
     nsIInputStream *inStr, void *closure, const char *fromSegment,
     uint32_t toOffset, uint32_t count, uint32_t *writeCount) {
   nsIncrementalStreamLoader *self = (nsIncrementalStreamLoader *)closure;
--- a/netwerk/base/nsInputStreamPump.cpp
+++ b/netwerk/base/nsInputStreamPump.cpp
@@ -647,17 +647,17 @@ uint32_t nsInputStreamPump::OnStateStop(
   mAsyncStream = nullptr;
   mTargetThread = nullptr;
   mIsPending = false;
   {
     // Note: Must exit mutex for call to OnStartRequest to avoid
     // deadlocks when calls to RetargetDeliveryTo for multiple
     // nsInputStreamPumps are needed (e.g. nsHttpChannel).
     RecursiveMutexAutoUnlock unlock(mMutex);
-    mListener->OnStopRequest(this, nullptr, mStatus);
+    mListener->OnStopRequest(this, mStatus);
   }
   mListener = nullptr;
 
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
 
   return STATE_IDLE;
 }
 
--- a/netwerk/base/nsLoadGroup.cpp
+++ b/netwerk/base/nsLoadGroup.cpp
@@ -567,17 +567,17 @@ nsLoadGroup::RemoveRequest(nsIRequest *r
     // Fire the OnStopRequest out to the observer...
     nsCOMPtr<nsIRequestObserver> observer = do_QueryReferent(mObserver);
     if (observer) {
       LOG(
           ("LOADGROUP [%p]: Firing OnStopRequest for request %p."
            "(foreground count=%d).\n",
            this, request, mForegroundCount));
 
-      rv = observer->OnStopRequest(request, ctxt, aStatus);
+      rv = observer->OnStopRequest(request, aStatus);
 
       if (NS_FAILED(rv)) {
         LOG(("LOADGROUP [%p]: OnStopRequest for request %p FAILED.\n", this,
              request));
       }
     }
 
     // If that was the last request -> remove ourselves from loadgroup
--- a/netwerk/base/nsRequestObserverProxy.cpp
+++ b/netwerk/base/nsRequestObserverProxy.cpp
@@ -95,17 +95,17 @@ class nsOnStopRequestEvent : public nsAR
     // Do not allow any more events to be handled after OnStopRequest
     mProxy->mObserver = nullptr;
 
     nsresult status = NS_OK;
     DebugOnly<nsresult> rv = mRequest->GetStatus(&status);
     NS_ASSERTION(NS_SUCCEEDED(rv), "GetStatus failed for request!");
 
     LOG(("handle stopevent=%p\n", this));
-    (void)observer->OnStopRequest(mRequest, mProxy->mContext, status);
+    (void)observer->OnStopRequest(mRequest, status);
 
     return NS_OK;
   }
 };
 
 //-----------------------------------------------------------------------------
 // nsRequestObserverProxy::nsISupports implementation...
 //-----------------------------------------------------------------------------
@@ -127,19 +127,18 @@ nsRequestObserverProxy::OnStartRequest(n
 
   LOG(("post startevent=%p\n", ev));
   nsresult rv = FireEvent(ev);
   if (NS_FAILED(rv)) delete ev;
   return rv;
 }
 
 NS_IMETHODIMP
-nsRequestObserverProxy::OnStopRequest(nsIRequest *request, nsISupports *context,
+nsRequestObserverProxy::OnStopRequest(nsIRequest *request,
                                       nsresult status) {
-  MOZ_ASSERT(!context || context == mContext);
   LOG(("nsRequestObserverProxy: OnStopRequest [this=%p req=%p status=%" PRIx32
        "]\n",
        this, request, static_cast<uint32_t>(status)));
 
   // The status argument is ignored because, by the time the OnStopRequestEvent
   // is actually processed, the status of the request may have changed :-(
   // To make sure that an accurate status code is always used, GetStatus() is
   // called when the OnStopRequestEvent is actually processed (see above).
--- a/netwerk/base/nsSimpleStreamListener.cpp
+++ b/netwerk/base/nsSimpleStreamListener.cpp
@@ -23,18 +23,18 @@ NS_IMPL_ISUPPORTS(nsSimpleStreamListener
 //
 NS_IMETHODIMP
 nsSimpleStreamListener::OnStartRequest(nsIRequest *aRequest) {
   return mObserver ? mObserver->OnStartRequest(aRequest) : NS_OK;
 }
 
 NS_IMETHODIMP
 nsSimpleStreamListener::OnStopRequest(nsIRequest *request,
-                                      nsISupports *aContext, nsresult aStatus) {
-  return mObserver ? mObserver->OnStopRequest(request, aContext, aStatus)
+                                      nsresult aStatus) {
+  return mObserver ? mObserver->OnStopRequest(request, aStatus)
                    : NS_OK;
 }
 
 //
 //----------------------------------------------------------------------------
 // nsIStreamListener implementation...
 //----------------------------------------------------------------------------
 //
--- a/netwerk/base/nsStreamListenerTee.cpp
+++ b/netwerk/base/nsStreamListenerTee.cpp
@@ -18,34 +18,34 @@ nsStreamListenerTee::OnStartRequest(nsIR
   nsresult rv2 = NS_OK;
   if (mObserver) rv2 = mObserver->OnStartRequest(request);
 
   // Preserve NS_SUCCESS_XXX in rv1 in case mObserver didn't throw
   return (NS_FAILED(rv2) && NS_SUCCEEDED(rv1)) ? rv2 : rv1;
 }
 
 NS_IMETHODIMP
-nsStreamListenerTee::OnStopRequest(nsIRequest *request, nsISupports *context,
+nsStreamListenerTee::OnStopRequest(nsIRequest *request,
                                    nsresult status) {
   NS_ENSURE_TRUE(mListener, NS_ERROR_NOT_INITIALIZED);
   // it is critical that we close out the input stream tee
   if (mInputTee) {
     mInputTee->SetSink(nullptr);
     mInputTee = nullptr;
   }
 
   // release sink on the same thread where the data was written (bug 716293)
   if (mEventTarget) {
     NS_ProxyRelease("nsStreamListenerTee::mSink", mEventTarget, mSink.forget());
   } else {
     mSink = nullptr;
   }
 
-  nsresult rv = mListener->OnStopRequest(request, context, status);
-  if (mObserver) mObserver->OnStopRequest(request, context, status);
+  nsresult rv = mListener->OnStopRequest(request, status);
+  if (mObserver) mObserver->OnStopRequest(request, status);
   mObserver = nullptr;
   return rv;
 }
 
 NS_IMETHODIMP
 nsStreamListenerTee::OnDataAvailable(nsIRequest *request, nsISupports *context,
                                      nsIInputStream *input, uint64_t offset,
                                      uint32_t count) {
--- a/netwerk/base/nsStreamLoader.cpp
+++ b/netwerk/base/nsStreamLoader.cpp
@@ -75,17 +75,17 @@ nsStreamLoader::OnStartRequest(nsIReques
   }
   if (mRequestObserver) {
     mRequestObserver->OnStartRequest(request);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsStreamLoader::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
+nsStreamLoader::OnStopRequest(nsIRequest *request,
                               nsresult aStatus) {
   AUTO_PROFILER_LABEL("nsStreamLoader::OnStopRequest", NETWORK);
 
   if (mObserver) {
     // provide nsIStreamLoader::request during call to OnStreamComplete
     mRequest = request;
     size_t length = mData.length();
     uint8_t *elems = mData.extractOrCopyRawBuffer();
@@ -95,21 +95,20 @@ nsStreamLoader::OnStopRequest(nsIRequest
       // The observer didn't take ownership of the extracted data buffer, so
       // put it back into mData.
       mData.replaceRawBuffer(elems, length);
     }
     // done.. cleanup
     ReleaseData();
     mRequest = nullptr;
     mObserver = nullptr;
-    mContext = nullptr;
   }
 
   if (mRequestObserver) {
-    mRequestObserver->OnStopRequest(request, ctxt, aStatus);
+    mRequestObserver->OnStopRequest(request, aStatus);
     mRequestObserver = nullptr;
   }
 
   return NS_OK;
 }
 
 nsresult nsStreamLoader::WriteSegmentFun(nsIInputStream *inStr, void *closure,
                                          const char *fromSegment,
--- a/netwerk/base/nsSyncStreamListener.cpp
+++ b/netwerk/base/nsSyncStreamListener.cpp
@@ -82,17 +82,17 @@ nsSyncStreamListener::OnDataAvailable(ns
   // the pipe was created to have "infinite" room.
   NS_ASSERTION(bytesWritten == count, "did not write all data");
 
   mKeepWaiting = false;  // unblock Read
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsSyncStreamListener::OnStopRequest(nsIRequest *request, nsISupports *context,
+nsSyncStreamListener::OnStopRequest(nsIRequest *request,
                                     nsresult status) {
   mStatus = status;
   mKeepWaiting = false;  // unblock Read
   mDone = true;
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
--- a/netwerk/dns/TRR.cpp
+++ b/netwerk/dns/TRR.cpp
@@ -961,17 +961,17 @@ nsresult TRR::On200Response() {
     }
   } else {
     LOG(("TRR::On200Response DohDecode %x\n", (int)rv));
   }
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-TRR::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+TRR::OnStopRequest(nsIRequest *aRequest,
                    nsresult aStatusCode) {
   // The dtor will be run after the function returns
   LOG(("TRR:OnStopRequest %p %s %d failed=%d code=%X\n", this, mHost.get(),
        mType, mFailed, (unsigned int)aStatusCode));
   nsCOMPtr<nsIChannel> channel;
   channel.swap(mChannel);
 
   // Bad content is still considered "okay" if the HTTP response is okay
--- a/netwerk/protocol/about/nsAboutCacheEntry.cpp
+++ b/netwerk/protocol/about/nsAboutCacheEntry.cpp
@@ -533,17 +533,17 @@ nsAboutCacheEntry::Channel::OnDataAvaila
   a->mOutputStream->Write(buffer.get(), buffer.Length(), &n);
 
   *aWriteCount = aCount;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsAboutCacheEntry::Channel::OnStopRequest(nsIRequest *request, nsISupports *ctx,
+nsAboutCacheEntry::Channel::OnStopRequest(nsIRequest *request,
                                           nsresult result) {
   NS_NAMED_LITERAL_CSTRING(buffer, "</pre>\n");
   uint32_t n;
   mOutputStream->Write(buffer.get(), buffer.Length(), &n);
 
   CloseContent();
 
   return NS_OK;
--- a/netwerk/protocol/data/DataChannelParent.cpp
+++ b/netwerk/protocol/data/DataChannelParent.cpp
@@ -80,17 +80,17 @@ NS_IMETHODIMP
 DataChannelParent::OnStartRequest(nsIRequest *aRequest) {
   // We don't have a way to prevent nsBaseChannel from calling AsyncOpen on
   // the created nsDataChannel. We don't have anywhere to send the data in the
   // parent, so abort the binding.
   return NS_BINDING_ABORTED;
 }
 
 NS_IMETHODIMP
-DataChannelParent::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+DataChannelParent::OnStopRequest(nsIRequest *aRequest,
                                  nsresult aStatusCode) {
   // See above.
   MOZ_ASSERT(NS_FAILED(aStatusCode));
   return NS_OK;
 }
 
 NS_IMETHODIMP
 DataChannelParent::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
--- a/netwerk/protocol/file/FileChannelParent.cpp
+++ b/netwerk/protocol/file/FileChannelParent.cpp
@@ -80,17 +80,17 @@ NS_IMETHODIMP
 FileChannelParent::OnStartRequest(nsIRequest *aRequest) {
   // We don't have a way to prevent nsBaseChannel from calling AsyncOpen on
   // the created nsDataChannel. We don't have anywhere to send the data in the
   // parent, so abort the binding.
   return NS_BINDING_ABORTED;
 }
 
 NS_IMETHODIMP
-FileChannelParent::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+FileChannelParent::OnStopRequest(nsIRequest *aRequest,
                                  nsresult aStatusCode) {
   // See above.
   MOZ_ASSERT(NS_FAILED(aStatusCode));
   return NS_OK;
 }
 
 NS_IMETHODIMP
 FileChannelParent::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
--- a/netwerk/protocol/ftp/FTPChannelChild.cpp
+++ b/netwerk/protocol/ftp/FTPChannelChild.cpp
@@ -509,17 +509,17 @@ void FTPChannelChild::DoOnStopRequest(co
     mUnknownDecoderEventQ.AppendElement(
         MakeUnique<MaybeDivertOnStopFTPEvent>(this, aChannelStatus));
   }
 
   {  // Ensure that all queued ipdl events are dispatched before
     // we initiate protocol deletion below.
     mIsPending = false;
     AutoEventEnqueuer ensureSerialDispatch(mEventQ);
-    (void)mListener->OnStopRequest(this, nullptr, aChannelStatus);
+    (void)mListener->OnStopRequest(this, aChannelStatus);
 
     mListener = nullptr;
 
     if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, aChannelStatus);
   }
 
   // This calls NeckoChild::DeallocPFTPChannelChild(), which deletes |this| if
   // IPDL holds the last reference.  Don't rely on |this| existing after here!
@@ -551,17 +551,17 @@ void FTPChannelChild::DoFailedAsyncOpen(
        this, static_cast<uint32_t>(statusCode)));
   mStatus = statusCode;
 
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, statusCode);
 
   if (mListener) {
     mListener->OnStartRequest(this);
     mIsPending = false;
-    mListener->OnStopRequest(this, nullptr, statusCode);
+    mListener->OnStopRequest(this, statusCode);
   } else {
     mIsPending = false;
   }
 
   mListener = nullptr;
 
   if (mIPCOpen) Send__delete__(this);
 }
--- a/netwerk/protocol/ftp/FTPChannelParent.cpp
+++ b/netwerk/protocol/ftp/FTPChannelParent.cpp
@@ -327,17 +327,17 @@ void FTPChannelParent::DivertOnStopReque
     nsCOMPtr<nsIForcePendingChannel> forcePendingIChan =
         do_QueryInterface(mChannel);
     if (forcePendingIChan) {
       forcePendingIChan->ForcePending(false);
     }
   }
 
   AutoEventEnqueuer ensureSerialDispatch(mEventQ);
-  OnStopRequest(mChannel, nullptr, status);
+  OnStopRequest(mChannel, status);
 }
 
 class FTPDivertCompleteEvent : public MainThreadChannelEvent {
  public:
   explicit FTPDivertCompleteEvent(FTPChannelParent* aParent)
       : mParent(aParent) {}
 
   void Run() override { mParent->DivertComplete(); }
@@ -435,25 +435,25 @@ FTPChannelParent::OnStartRequest(nsIRequ
                                         lastModified, entityID, uriparam)) {
     return NS_ERROR_UNEXPECTED;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-FTPChannelParent::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+FTPChannelParent::OnStopRequest(nsIRequest* aRequest,
                                 nsresult aStatusCode) {
   LOG(("FTPChannelParent::OnStopRequest: [this=%p status=%" PRIu32 "]\n", this,
        static_cast<uint32_t>(aStatusCode)));
 
   if (mDivertingFromChild) {
     MOZ_RELEASE_ASSERT(mDivertToListener,
                        "Cannot divert if listener is unset!");
-    return mDivertToListener->OnStopRequest(aRequest, aContext, aStatusCode);
+    return mDivertToListener->OnStopRequest(aRequest, aStatusCode);
   }
 
   if (mIPCClosed || !SendOnStopRequest(aStatusCode, mErrorMsg, mUseUTF8)) {
     return NS_ERROR_UNEXPECTED;
   }
 
   return NS_OK;
 }
@@ -803,17 +803,17 @@ void FTPChannelParent::NotifyDiversionFa
 
     if (forcePendingIChan) {
       forcePendingIChan->ForcePending(false);
     }
   }
   // If the channel is pending, it will call OnStopRequest itself; otherwise, do
   // it here.
   if (!isPending) {
-    mDivertToListener->OnStopRequest(mChannel, nullptr, aErrorCode);
+    mDivertToListener->OnStopRequest(mChannel, aErrorCode);
   }
   mDivertToListener = nullptr;
   mChannel = nullptr;
 
   if (!mIPCClosed) {
     Unused << SendDeleteSelf();
   }
 }
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
@@ -1797,17 +1797,17 @@ nsFtpState::OnTransportStatus(nsITranspo
 
 NS_IMETHODIMP
 nsFtpState::OnStartRequest(nsIRequest *request) {
   mStorReplyReceived = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsFtpState::OnStopRequest(nsIRequest *request, nsISupports *context,
+nsFtpState::OnStopRequest(nsIRequest *request,
                           nsresult status) {
   mUploadRequest = nullptr;
 
   // Close() will be called when reply to STOR command is received
   // see bug #389394
   if (!mStorReplyReceived) return NS_OK;
 
   // We're done uploading.  Let our consumer know that we're done.
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -799,17 +799,17 @@ TransactionObserver::OnDataAvailable(nsI
     } else {
       LOG(("TransactionObserver onDataAvailable %p read error\n", this));
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TransactionObserver::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+TransactionObserver::OnStopRequest(nsIRequest *aRequest,
                                    nsresult code) {
   MOZ_ASSERT(NS_IsMainThread());
   LOG(("TransactionObserver onStopRequest %p code %" PRIx32 "\n", this,
        static_cast<uint32_t>(code)));
   if (NS_SUCCEEDED(code)) {
     nsHttpResponseHead *hdrs = mChannel->GetResponseHead();
     LOG(("TransactionObserver onStopRequest %p http resp %d\n", this,
          hdrs ? hdrs->Status() : -1));
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -1148,24 +1148,24 @@ class InterceptFailedOnStop : public nsI
   InterceptFailedOnStop(nsIStreamListener* arg, HttpBaseChannel* chan)
       : mNext(arg), mChannel(chan) {}
   NS_DECL_THREADSAFE_ISUPPORTS
 
   NS_IMETHOD OnStartRequest(nsIRequest* aRequest) override {
     return mNext->OnStartRequest(aRequest);
   }
 
-  NS_IMETHOD OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+  NS_IMETHOD OnStopRequest(nsIRequest* aRequest,
                            nsresult aStatusCode) override {
     if (NS_FAILED(aStatusCode) && NS_SUCCEEDED(mChannel->mStatus)) {
       LOG(("HttpBaseChannel::InterceptFailedOnStop %p seting status %" PRIx32,
            mChannel, static_cast<uint32_t>(aStatusCode)));
       mChannel->mStatus = aStatusCode;
     }
-    return mNext->OnStopRequest(aRequest, aContext, aStatusCode);
+    return mNext->OnStopRequest(aRequest, aStatusCode);
   }
 
   NS_IMETHOD OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
                              nsIInputStream* aInputStream, uint64_t aOffset,
                              uint32_t aCount) override {
     return mNext->OnDataAvailable(aRequest, aContext, aInputStream, aOffset,
                                   aCount);
   }
@@ -3300,17 +3300,17 @@ void HttpBaseChannel::DoNotifyListener()
 
   // Make sure mIsPending is set to false. At this moment we are done from
   // the point of view of our consumer and we have to report our self
   // as not-pending.
   mIsPending = false;
 
   if (mListener && !mOnStopRequestCalled) {
     nsCOMPtr<nsIStreamListener> listener = mListener;
-    listener->OnStopRequest(this, nullptr, mStatus);
+    listener->OnStopRequest(this, mStatus);
 
     mOnStopRequestCalled = true;
   }
 
   // notify "http-on-stop-connect" observers
   gHttpHandler->OnStopRequest(this);
 
   // This channel has finished its job, potentially release any tail-blocked
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -136,17 +136,16 @@ InterceptStreamListener::OnDataAvailable
   }
 
   mOwner->DoOnDataAvailable(mOwner, mContext, aInputStream, aOffset, aCount);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 InterceptStreamListener::OnStopRequest(nsIRequest* aRequest,
-                                       nsISupports* aContext,
                                        nsresult aStatusCode) {
   if (mOwner) {
     mOwner->DoPreOnStopRequest(aStatusCode);
     mOwner->DoOnStopRequest(mOwner, aStatusCode, mContext);
   }
   Cleanup();
   return NS_OK;
 }
@@ -609,17 +608,17 @@ class SyntheticDiversionListener final :
   NS_IMETHOD
   OnStartRequest(nsIRequest* aRequest) override {
     MOZ_ASSERT_UNREACHABLE(
         "SyntheticDiversionListener should never see OnStartRequest");
     return NS_OK;
   }
 
   NS_IMETHOD
-  OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+  OnStopRequest(nsIRequest* aRequest,
                 nsresult aStatus) override {
     if (mChannel->mIPCOpen) {
       mChannel->SendDivertOnStopRequest(aStatus);
       mChannel->SendDivertComplete();
     }
     return NS_OK;
   }
 
@@ -1222,17 +1221,17 @@ void HttpChannelChild::DoOnStopRequest(n
   };
   checkForBlockedContent();
 
   MOZ_ASSERT(!mOnStopRequestCalled, "We should not call OnStopRequest twice");
 
   // In theory mListener should not be null, but in practice sometimes it is.
   MOZ_ASSERT(mListener);
   if (mListener) {
-    mListener->OnStopRequest(aRequest, aContext, mStatus);
+    mListener->OnStopRequest(aRequest, mStatus);
   }
   mOnStopRequestCalled = true;
 
   // notify "http-on-stop-connect" observers
   gHttpHandler->OnStopRequest(this);
 
   ReleaseListeners();
 
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1144,17 +1144,17 @@ void HttpChannelParent::DivertOnStopRequ
   nsresult status = NS_FAILED(mStatus) ? mStatus : statusCode;
 
   // Reset fake pending status in case OnStopRequest has already been called.
   if (mChannel) {
     mChannel->ForcePending(false);
   }
 
   AutoEventEnqueuer ensureSerialDispatch(mEventQ);
-  mParentListener->OnStopRequest(mChannel, nullptr, status);
+  mParentListener->OnStopRequest(mChannel, status);
 }
 
 class DivertCompleteEvent : public MainThreadChannelEvent {
  public:
   explicit DivertCompleteEvent(HttpChannelParent* aParent) : mParent(aParent) {}
 
   void Run() override { mParent->DivertComplete(); }
 
@@ -1474,17 +1474,17 @@ HttpChannelParent::OnStartRequest(nsIReq
       rv = NS_ERROR_UNEXPECTED;
     }
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
-HttpChannelParent::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+HttpChannelParent::OnStopRequest(nsIRequest* aRequest,
                                  nsresult aStatusCode) {
   LOG(("HttpChannelParent::OnStopRequest: [this=%p aRequest=%p status=%" PRIx32
        "]\n",
        this, aRequest, static_cast<uint32_t>(aStatusCode)));
   MOZ_ASSERT(NS_IsMainThread());
 
   if (mDoingCrossProcessRedirect) {
     LOG(("Child was cancelled for cross-process redirect. Bail."));
@@ -2331,17 +2331,17 @@ void HttpChannelParent::NotifyDiversionF
   if (!mDivertedOnStartRequest) {
     mChannel->ForcePending(true);
     mParentListener->OnStartRequest(mChannel);
     mChannel->ForcePending(false);
   }
   // If the channel is pending, it will call OnStopRequest itself; otherwise, do
   // it here.
   if (!isPending) {
-    mParentListener->OnStopRequest(mChannel, nullptr, aErrorCode);
+    mParentListener->OnStopRequest(mChannel, aErrorCode);
   }
 
   if (!mIPCClosed) {
     Unused << DoSendDeleteSelf();
   }
 
   // DoSendDeleteSelf will need channel Id to remove the strong reference in
   // BackgroundChannelRegistrar if channel pairing is aborted.
--- a/netwerk/protocol/http/HttpChannelParentListener.cpp
+++ b/netwerk/protocol/http/HttpChannelParentListener.cpp
@@ -78,27 +78,26 @@ HttpChannelParentListener::OnStartReques
   if (!mNextListener) return NS_ERROR_UNEXPECTED;
 
   LOG(("HttpChannelParentListener::OnStartRequest [this=%p]\n", this));
   return mNextListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 HttpChannelParentListener::OnStopRequest(nsIRequest* aRequest,
-                                         nsISupports* aContext,
                                          nsresult aStatusCode) {
   MOZ_RELEASE_ASSERT(!mSuspendedForDiversion,
                      "Cannot call OnStopRequest if suspended for diversion!");
 
   if (!mNextListener) return NS_ERROR_UNEXPECTED;
 
   LOG(("HttpChannelParentListener::OnStopRequest: [this=%p status=%" PRIu32
        "]\n",
        this, static_cast<uint32_t>(aStatusCode)));
-  nsresult rv = mNextListener->OnStopRequest(aRequest, aContext, aStatusCode);
+  nsresult rv = mNextListener->OnStopRequest(aRequest, aStatusCode);
 
   mNextListener = nullptr;
   return rv;
 }
 
 //-----------------------------------------------------------------------------
 // HttpChannelParentListener::nsIStreamListener
 //-----------------------------------------------------------------------------
--- a/netwerk/protocol/http/InterceptedHttpChannel.cpp
+++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp
@@ -1022,17 +1022,17 @@ InterceptedHttpChannel::OnStartRequest(n
   if (mListener) {
     mListener->OnStartRequest(this);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 InterceptedHttpChannel::OnStopRequest(nsIRequest* aRequest,
-                                      nsISupports* aContext, nsresult aStatus) {
+                                      nsresult aStatus) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (NS_SUCCEEDED(mStatus)) {
     mStatus = aStatus;
   }
 
   MaybeCallBodyCallback();
 
@@ -1043,17 +1043,17 @@ InterceptedHttpChannel::OnStopRequest(ns
   MaybeCallStatusAndProgress();
 
   mIsPending = false;
 
   // Register entry to the PerformanceStorage resource timing
   MaybeReportTimingData();
 
   if (mListener) {
-    mListener->OnStopRequest(this, nullptr, mStatus);
+    mListener->OnStopRequest(this, mStatus);
   }
 
   gHttpHandler->OnStopRequest(this);
 
   ReleaseListeners();
 
   return NS_OK;
 }
--- a/netwerk/protocol/http/nsCORSListenerProxy.cpp
+++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp
@@ -598,25 +598,25 @@ nsresult nsCORSListenerProxy::CheckReque
       return NS_ERROR_DOM_BAD_URI;
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsCORSListenerProxy::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+nsCORSListenerProxy::OnStopRequest(nsIRequest* aRequest,
                                    nsresult aStatusCode) {
   MOZ_ASSERT(mInited, "nsCORSListenerProxy has not been initialized properly");
   nsCOMPtr<nsIStreamListener> listener;
   {
     MutexAutoLock lock(mMutex);
     listener = mOuterListener.forget();
   }
-  nsresult rv = listener->OnStopRequest(aRequest, aContext, aStatusCode);
+  nsresult rv = listener->OnStopRequest(aRequest, aStatusCode);
   mOuterNotificationCallbacks = nullptr;
   mHttpChannel = nullptr;
   return rv;
 }
 
 NS_IMETHODIMP
 nsCORSListenerProxy::OnDataAvailable(nsIRequest* aRequest,
                                      nsISupports* aContext,
@@ -1229,17 +1229,16 @@ nsCORSPreflightListener::OnStartRequest(
     mCallback->OnPreflightFailed(rv);
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsCORSPreflightListener::OnStopRequest(nsIRequest* aRequest,
-                                       nsISupports* aContext,
                                        nsresult aStatus) {
   mCallback = nullptr;
   return NS_OK;
 }
 
 /** nsIStreamListener methods **/
 
 NS_IMETHODIMP
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -7528,17 +7528,17 @@ nsresult nsHttpChannel::ContinueOnStartR
   LOG(("nsHttpChannel::ContinueOnStartRequest4 [this=%p]", this));
 
   if (mFallingBack) return NS_OK;
 
   return CallOnStartRequest();
 }
 
 NS_IMETHODIMP
-nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
+nsHttpChannel::OnStopRequest(nsIRequest *request,
                              nsresult status) {
   AUTO_PROFILER_LABEL("nsHttpChannel::OnStopRequest", NETWORK);
 
   LOG(("nsHttpChannel::OnStopRequest [this=%p request=%p status=%" PRIx32 "]\n",
        this, request, static_cast<uint32_t>(status)));
 
   LOG(("OnStopRequest %p requestFromCache: %d mFirstResponseSource: %d\n", this,
        request == mCachePump, static_cast<int32_t>(mFirstResponseSource)));
@@ -7936,17 +7936,17 @@ nsresult nsHttpChannel::ContinueOnStopRe
   }
 #endif
 
   if (mListener) {
     LOG(("nsHttpChannel %p calling OnStopRequest\n", this));
     MOZ_ASSERT(mOnStartRequestCalled,
                "OnStartRequest should be called before OnStopRequest");
     MOZ_ASSERT(!mOnStopRequestCalled, "We should not call OnStopRequest twice");
-    mListener->OnStopRequest(this, nullptr, aStatus);
+    mListener->OnStopRequest(this, aStatus);
     mOnStopRequestCalled = true;
   }
 
   // notify "http-on-stop-connect" observers
   gHttpHandler->OnStopRequest(this);
 
   RemoveAsNonTailRequest();
 
--- a/netwerk/protocol/res/ExtensionProtocolHandler.cpp
+++ b/netwerk/protocol/res/ExtensionProtocolHandler.cpp
@@ -232,17 +232,17 @@ Result<Ok, nsresult> ExtensionStreamGett
 }
 
 static void CancelRequest(nsIStreamListener* aListener, nsIChannel* aChannel,
                           nsresult aResult) {
   MOZ_ASSERT(aListener);
   MOZ_ASSERT(aChannel);
 
   aListener->OnStartRequest(aChannel);
-  aListener->OnStopRequest(aChannel, nullptr, aResult);
+  aListener->OnStopRequest(aChannel, aResult);
   aChannel->Cancel(NS_BINDING_ABORTED);
 }
 
 // Handle an input stream sent from the parent.
 void ExtensionStreamGetter::OnStream(already_AddRefed<nsIInputStream> aStream) {
   MOZ_ASSERT(IsNeckoChild());
   MOZ_ASSERT(mListener);
   MOZ_ASSERT(mMainThreadEventTarget);
--- a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
+++ b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
@@ -630,29 +630,29 @@ nsViewSourceChannel::OnStartRequest(nsIR
   if (NS_FAILED(rv)) {
     Cancel(rv);
   }
 
   return mListener->OnStartRequest(static_cast<nsIViewSourceChannel *>(this));
 }
 
 NS_IMETHODIMP
-nsViewSourceChannel::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+nsViewSourceChannel::OnStopRequest(nsIRequest *aRequest,
                                    nsresult aStatus) {
   NS_ENSURE_TRUE(mListener, NS_ERROR_FAILURE);
   if (mChannel) {
     nsCOMPtr<nsILoadGroup> loadGroup;
     mChannel->GetLoadGroup(getter_AddRefs(loadGroup));
     if (loadGroup) {
       loadGroup->RemoveRequest(static_cast<nsIViewSourceChannel *>(this),
                                nullptr, aStatus);
     }
   }
   return mListener->OnStopRequest(static_cast<nsIViewSourceChannel *>(this),
-                                  aContext, aStatus);
+                                  aStatus);
 }
 
 // nsIStreamListener methods
 NS_IMETHODIMP
 nsViewSourceChannel::OnDataAvailable(nsIRequest *aRequest,
                                      nsISupports *aContext,
                                      nsIInputStream *aInputStream,
                                      uint64_t aSourceOffset, uint32_t aLength) {
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
@@ -3842,17 +3842,17 @@ WebSocketChannel::OnStartRequest(nsIRequ
 
     return CallStartWebsocketData();
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-WebSocketChannel::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+WebSocketChannel::OnStopRequest(nsIRequest *aRequest,
                                 nsresult aStatusCode) {
   LOG(("WebSocketChannel::OnStopRequest() %p [%p %p %" PRIx32 "]\n", this,
        aRequest, mHttpChannel.get(), static_cast<uint32_t>(aStatusCode)));
   MOZ_ASSERT(NS_IsMainThread(), "not main thread");
 
   // OnTransportAvailable won't be called if the request is stopped with
   // an error. Abort the session now instead of waiting for timeout.
   if (NS_FAILED(aStatusCode) && !mRecvdHttpUpgradeTransport) {
--- a/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
+++ b/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
@@ -273,17 +273,17 @@ void WyciwygChannelChild::OnStopRequest(
     AutoEventEnqueuer ensureSerialDispatch(mEventQ);
 
     mState = WCC_ONSTOP;
 
     mIsPending = false;
 
     if (!mCanceled) mStatus = statusCode;
 
-    mListener->OnStopRequest(this, nullptr, statusCode);
+    mListener->OnStopRequest(this, statusCode);
 
     mListener = nullptr;
 
     if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
 
     mCallbacks = nullptr;
     mProgressSink = nullptr;
   }
@@ -316,17 +316,17 @@ void WyciwygChannelChild::CancelEarly(co
   mCanceled = true;
   mStatus = statusCode;
 
   mIsPending = false;
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
 
   if (mListener) {
     mListener->OnStartRequest(this);
-    mListener->OnStopRequest(this, nullptr, mStatus);
+    mListener->OnStopRequest(this, mStatus);
   }
   mListener = nullptr;
 
   if (mIPCOpen) PWyciwygChannelChild::Send__delete__(this);
 }
 
 //-----------------------------------------------------------------------------
 // nsIRequest
--- a/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
+++ b/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
@@ -324,17 +324,17 @@ WyciwygChannelParent::OnStartRequest(nsI
                                         charset, secInfoStr)) {
     return NS_ERROR_UNEXPECTED;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-WyciwygChannelParent::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+WyciwygChannelParent::OnStopRequest(nsIRequest* aRequest,
                                     nsresult aStatusCode) {
   LOG(("WyciwygChannelParent::OnStopRequest: [this=%p status=%" PRIu32 "]\n",
        this, static_cast<uint32_t>(aStatusCode)));
 
   if (mIPCClosed || !SendOnStopRequest(aStatusCode)) {
     return NS_ERROR_UNEXPECTED;
   }
 
--- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
+++ b/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
@@ -586,31 +586,31 @@ nsWyciwygChannel::OnStartRequest(nsIRequ
     return listener->OnStartRequest(this);
   }
 
   MOZ_ASSERT(false, "We must have a listener!");
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP
-nsWyciwygChannel::OnStopRequest(nsIRequest *request, nsISupports *ctx,
+nsWyciwygChannel::OnStopRequest(nsIRequest *request,
                                 nsresult status) {
   LOG(("nsWyciwygChannel::OnStopRequest [this=%p request=%p status=%" PRIu32
        "]\n",
        this, request, static_cast<uint32_t>(status)));
 
   if (NS_SUCCEEDED(mStatus)) mStatus = status;
 
   mIsPending = false;
 
   nsCOMPtr<nsIStreamListener> listener;
   listener.swap(mListener);
 
   if (listener) {
-    listener->OnStopRequest(this, nullptr, mStatus);
+    listener->OnStopRequest(this, mStatus);
   } else {
     MOZ_ASSERT(false, "We must have a listener!");
   }
 
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
 
   CloseCacheEntry(mStatus);
   mPump = nullptr;
@@ -711,17 +711,17 @@ void nsWyciwygChannel::WriteCharsetAndSo
 void nsWyciwygChannel::NotifyListener() {
   nsCOMPtr<nsIStreamListener> listener;
 
   listener.swap(mListener);
 
   if (listener) {
     listener->OnStartRequest(this);
     mIsPending = false;
-    listener->OnStopRequest(this, nullptr, mStatus);
+    listener->OnStopRequest(this, mStatus);
   } else {
     MOZ_ASSERT(false, "We must have the listener!");
     mIsPending = false;
   }
 
   CloseCacheEntry(mStatus);
 
   // Remove ourselves from the load group.
--- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
@@ -1225,17 +1225,17 @@ mozTXTToHTMLConv::OnDataAvailable(nsIReq
 }
 
 NS_IMETHODIMP
 mozTXTToHTMLConv::OnStartRequest(nsIRequest* request) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-mozTXTToHTMLConv::OnStopRequest(nsIRequest* request, nsISupports* ctxt,
+mozTXTToHTMLConv::OnStopRequest(nsIRequest* request,
                                 nsresult aStatus) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 mozTXTToHTMLConv::CiteLevelTXT(const char16_t* line, uint32_t* logLineStart,
                                uint32_t* _retval) {
   if (!logLineStart || !_retval || !line) return NS_ERROR_NULL_POINTER;
--- a/netwerk/streamconv/converters/nsDirIndexParser.cpp
+++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp
@@ -87,21 +87,21 @@ nsDirIndexParser::GetEncoding(char **aEn
 }
 
 NS_IMETHODIMP
 nsDirIndexParser::OnStartRequest(nsIRequest *aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDirIndexParser::OnStopRequest(nsIRequest *aRequest, nsISupports *aCtxt,
+nsDirIndexParser::OnStopRequest(nsIRequest *aRequest,
                                 nsresult aStatusCode) {
   // Finish up
   if (mBuf.Length() > (uint32_t)mLineStart) {
-    ProcessData(aRequest, aCtxt);
+    ProcessData(aRequest, nullptr);
   }
 
   return NS_OK;
 }
 
 nsDirIndexParser::Field nsDirIndexParser::gFieldTable[] = {
     {"Filename", FIELD_FILENAME},
     {"Description", FIELD_DESCRIPTION},
--- a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp
+++ b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp
@@ -163,21 +163,21 @@ nsFTPDirListingConv::OnDataAvailable(nsI
 NS_IMETHODIMP
 nsFTPDirListingConv::OnStartRequest(nsIRequest *request) {
   // we don't care about start. move along... but start masqeurading
   // as the http-index channel now.
   return mFinalListener->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
-nsFTPDirListingConv::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
+nsFTPDirListingConv::OnStopRequest(nsIRequest *request,
                                    nsresult aStatus) {
   // we don't care about stop. move along...
 
-  return mFinalListener->OnStopRequest(request, ctxt, aStatus);
+  return mFinalListener->OnStopRequest(request, aStatus);
 }
 
 // nsFTPDirListingConv methods
 nsFTPDirListingConv::nsFTPDirListingConv() {
   mFinalListener = nullptr;
   mSentHeading = false;
 }
 
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
@@ -122,17 +122,17 @@ nsHTTPCompressConv::OnStartRequest(nsIRe
   {
     MutexAutoLock lock(mMutex);
     listener = mListener;
   }
   return listener->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
-nsHTTPCompressConv::OnStopRequest(nsIRequest *request, nsISupports *aContext,
+nsHTTPCompressConv::OnStopRequest(nsIRequest *request,
                                   nsresult aStatus) {
   nsresult status = aStatus;
   LOG(("nsHttpCompresssConv %p onstop %" PRIx32 "\n", this,
        static_cast<uint32_t>(aStatus)));
 
   // Framing integrity is enforced for content-encoding: gzip, but not for
   // content-encoding: deflate. Note that gzip vs deflate is NOT determined
   // by content sniffing but only via header.
@@ -162,17 +162,17 @@ nsHTTPCompressConv::OnStopRequest(nsIReq
     }
   }
 
   nsCOMPtr<nsIStreamListener> listener;
   {
     MutexAutoLock lock(mMutex);
     listener = mListener;
   }
-  return listener->OnStopRequest(request, aContext, status);
+  return listener->OnStopRequest(request, status);
 }
 
 /* static */ nsresult nsHTTPCompressConv::BrotliHandler(
     nsIInputStream *stream, void *closure, const char *dataIn, uint32_t,
     uint32_t aAvail, uint32_t *countRead) {
   MOZ_ASSERT(stream);
   nsHTTPCompressConv *self = static_cast<nsHTTPCompressConv *>(closure);
   *countRead = 0;
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -636,29 +636,29 @@ nsresult nsIndexedToHTML::DoOnStartReque
       " </thead>\n");
   buffer.AppendLiteral(" <tbody>\n");
 
   aBuffer = buffer;
   return rv;
 }
 
 NS_IMETHODIMP
-nsIndexedToHTML::OnStopRequest(nsIRequest* request, nsISupports* aContext,
+nsIndexedToHTML::OnStopRequest(nsIRequest* request,
                                nsresult aStatus) {
   if (NS_SUCCEEDED(aStatus)) {
     nsCString buffer;
     buffer.AssignLiteral("</tbody></table></body></html>\n");
 
-    aStatus = SendToListener(request, aContext, buffer);
+    aStatus = SendToListener(request, nullptr, buffer);
   }
 
-  mParser->OnStopRequest(request, aContext, aStatus);
+  mParser->OnStopRequest(request, aStatus);
   mParser = nullptr;
 
-  return mListener->OnStopRequest(request, aContext, aStatus);
+  return mListener->OnStopRequest(request, aStatus);
 }
 
 nsresult nsIndexedToHTML::SendToListener(nsIRequest* aRequest,
                                          nsISupports* aContext,
                                          const nsACString& aBuffer) {
   nsCOMPtr<nsIInputStream> inputData;
   nsresult rv = NS_NewCStringInputStream(getter_AddRefs(inputData), aBuffer);
   NS_ENSURE_SUCCESS(rv, rv);
--- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp
+++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp
@@ -58,17 +58,17 @@ nsresult nsPartChannel::SendOnDataAvaila
   return mListener->OnDataAvailable(this, aContext, aStream, aOffset, aLen);
 }
 
 nsresult nsPartChannel::SendOnStopRequest(nsISupports *aContext,
                                           nsresult aStatus) {
   // Drop the listener
   nsCOMPtr<nsIStreamListener> listener;
   listener.swap(mListener);
-  return listener->OnStopRequest(this, aContext, aStatus);
+  return listener->OnStopRequest(this, aStatus);
 }
 
 void nsPartChannel::SetContentDisposition(
     const nsACString &aContentDispositionHeader) {
   mContentDispositionHeader = aContentDispositionHeader;
   nsCOMPtr<nsIURI> uri;
   GetURI(getter_AddRefs(uri));
   NS_GetFilenameFromDisposition(mContentDispositionFilename,
@@ -518,17 +518,17 @@ nsMultiMixedConv::OnDataAvailable(nsIReq
   // parsing process.  Otherwise the raw data reference would not be thrown
   // away.
   nsresult rv_send = SendData();
 
   return NS_FAILED(rv_send) ? rv_send : rv_feed;
 }
 
 NS_IMETHODIMP
-nsMultiMixedConv::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
+nsMultiMixedConv::OnStopRequest(nsIRequest *request,
                                 nsresult aStatus) {
   nsresult rv;
 
   if (mBoundary.IsEmpty()) {  // no token, no love.
     return NS_ERROR_FAILURE;
   }
 
   if (mPartChannel) {
@@ -548,17 +548,17 @@ nsMultiMixedConv::OnStopRequest(nsIReque
 
     (void)SendStop(aStatus);
   } else if (NS_FAILED(aStatus) && !mRequestListenerNotified) {
     // underlying data production problem. we should not be in
     // the middle of sending data. if we were, mPartChannel,
     // above, would have been non-null.
 
     (void)mFinalListener->OnStartRequest(request);
-    (void)mFinalListener->OnStopRequest(request, ctxt, aStatus);
+    (void)mFinalListener->OnStopRequest(request, aStatus);
   }
 
   return NS_OK;
 }
 
 nsresult nsMultiMixedConv::ConsumeToken(Token const &token) {
   nsresult rv;
 
--- a/netwerk/streamconv/converters/nsUnknownDecoder.cpp
+++ b/netwerk/streamconv/converters/nsUnknownDecoder.cpp
@@ -69,17 +69,16 @@ nsUnknownDecoder::ConvertedStreamListene
   }
   MutexAutoLock lock(mDecoder->mMutex);
   mDecoder->mDecodedData = decodedData;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsUnknownDecoder::ConvertedStreamListener::OnStopRequest(nsIRequest* request,
-                                                         nsISupports* context,
                                                          nsresult status) {
   return NS_OK;
 }
 
 nsUnknownDecoder::nsUnknownDecoder()
     : mBuffer(nullptr),
       mBufferLen(0),
       mRequireHTMLsuffix(false),
@@ -264,17 +263,17 @@ nsUnknownDecoder::OnStartRequest(nsIRequ
     divertable->UnknownDecoderInvolvedKeepData();
   }
 
   // Do not pass the OnStartRequest on to the next listener (yet)...
   return rv;
 }
 
 NS_IMETHODIMP
-nsUnknownDecoder::OnStopRequest(nsIRequest* request, nsISupports* aCtxt,
+nsUnknownDecoder::OnStopRequest(nsIRequest* request,
                                 nsresult aStatus) {
   nsresult rv = NS_OK;
 
   bool contentTypeEmpty;
   {
     MutexAutoLock lock(mMutex);
     if (!mNextListener) return NS_ERROR_FAILURE;
 
@@ -292,17 +291,17 @@ nsUnknownDecoder::OnStopRequest(nsIReque
     // OnStartRequest/OnDataAvailable, even though the underlying channel
     // has already hit OnStopRequest.
     nsCOMPtr<nsIForcePendingChannel> forcePendingChannel =
         do_QueryInterface(request);
     if (forcePendingChannel) {
       forcePendingChannel->ForcePending(true);
     }
 
-    rv = FireListenerNotifications(request, aCtxt);
+    rv = FireListenerNotifications(request, nullptr);
 
     if (NS_FAILED(rv)) {
       aStatus = rv;
     }
 
     // now we need to set pending state to false before calling OnStopRequest
     if (forcePendingChannel) {
       forcePendingChannel->ForcePending(false);
@@ -310,17 +309,17 @@ nsUnknownDecoder::OnStopRequest(nsIReque
   }
 
   nsCOMPtr<nsIStreamListener> listener;
   {
     MutexAutoLock lock(mMutex);
     listener = mNextListener;
     mNextListener = nullptr;
   }
-  rv = listener->OnStopRequest(request, aCtxt, aStatus);
+  rv = listener->OnStopRequest(request, aStatus);
 
   return rv;
 }
 
 // ----
 //
 // nsIContentSniffer methods...
 //
@@ -798,17 +797,17 @@ nsresult nsUnknownDecoder::ConvertEncode
 
         rv = rawStream->SetData((const char*)data, length);
         NS_ENSURE_SUCCESS(rv, rv);
 
         rv = listener->OnDataAvailable(request, nullptr, rawStream, 0, length);
         NS_ENSURE_SUCCESS(rv, rv);
       }
 
-      listener->OnStopRequest(request, nullptr, NS_OK);
+      listener->OnStopRequest(request, NS_OK);
     }
   }
   return rv;
 }
 
 //
 // nsIThreadRetargetableStreamListener methods
 //
--- a/parser/html/nsHtml5StreamListener.cpp
+++ b/parser/html/nsHtml5StreamListener.cpp
@@ -38,21 +38,21 @@ nsHtml5StreamListener::OnStartRequest(ns
   if (MOZ_UNLIKELY(!mDelegate)) {
     return NS_ERROR_NOT_AVAILABLE;
   }
   return mDelegate->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 nsHtml5StreamListener::OnStopRequest(nsIRequest* aRequest,
-                                     nsISupports* aContext, nsresult aStatus) {
+                                     nsresult aStatus) {
   if (MOZ_UNLIKELY(!mDelegate)) {
     return NS_ERROR_NOT_AVAILABLE;
   }
-  return mDelegate->OnStopRequest(aRequest, aContext, aStatus);
+  return mDelegate->OnStopRequest(aRequest, aStatus);
 }
 
 NS_IMETHODIMP
 nsHtml5StreamListener::OnDataAvailable(nsIRequest* aRequest,
                                        nsISupports* aContext,
                                        nsIInputStream* aInStream,
                                        uint64_t aSourceOffset,
                                        uint32_t aLength) {
--- a/parser/html/nsHtml5StreamParser.cpp
+++ b/parser/html/nsHtml5StreamParser.cpp
@@ -1163,22 +1163,21 @@ class nsHtml5RequestStopper : public Run
   NS_IMETHOD Run() override {
     mozilla::MutexAutoLock autoLock(mStreamParser->mTokenizerMutex);
     mStreamParser->DoStopRequest();
     return NS_OK;
   }
 };
 
 nsresult nsHtml5StreamParser::OnStopRequest(nsIRequest* aRequest,
-                                            nsISupports* aContext,
                                             nsresult status) {
   NS_ASSERTION(mRequest == aRequest, "Got Stop on wrong stream.");
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   if (mObserver) {
-    mObserver->OnStopRequest(aRequest, aContext, status);
+    mObserver->OnStopRequest(aRequest, status);
   }
   nsCOMPtr<nsIRunnable> stopper = new nsHtml5RequestStopper(this);
   if (NS_FAILED(mEventTarget->Dispatch(stopper, nsIThread::DISPATCH_NORMAL))) {
     NS_WARNING("Dispatching StopRequest event failed.");
   }
   return NS_OK;
 }
 
--- a/parser/html/nsHtml5StreamParser.h
+++ b/parser/html/nsHtml5StreamParser.h
@@ -127,17 +127,17 @@ class nsHtml5StreamParser final : public
   nsresult CheckListenerChain();
 
   nsresult OnStartRequest(nsIRequest* aRequest);
 
   nsresult OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
                            nsIInputStream* aInStream, uint64_t aSourceOffset,
                            uint32_t aLength);
 
-  nsresult OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+  nsresult OnStopRequest(nsIRequest* aRequest,
                          nsresult status);
 
   // nsICharsetDetectionObserver
   /**
    * Chardet calls this to report the detection result
    */
   NS_IMETHOD Notify(const char* aCharset, nsDetectionConfident aConf) override;
 
--- a/parser/htmlparser/nsParser.cpp
+++ b/parser/htmlparser/nsParser.cpp
@@ -1325,17 +1325,17 @@ nsresult nsParser::OnDataAvailable(nsIRe
 
   return rv;
 }
 
 /**
  *  This is called by the networking library once the last block of data
  *  has been collected from the net.
  */
-nsresult nsParser::OnStopRequest(nsIRequest* request, nsISupports* aContext,
+nsresult nsParser::OnStopRequest(nsIRequest* request,
                                  nsresult status) {
   nsresult rv = NS_OK;
 
   CParserContext* pc = mParserContext;
   while (pc) {
     if (pc->mRequest == request) {
       pc->mStreamListenerState = eOnStop;
       pc->mScanner->SetIncremental(false);
@@ -1357,17 +1357,17 @@ nsresult nsParser::OnStopRequest(nsIRequ
   }
 
   // If the parser isn't enabled, we don't finish parsing till
   // it is reenabled.
 
   // XXX Should we wait to notify our observers as well if the
   // parser isn't yet enabled?
   if (mObserver) {
-    mObserver->OnStopRequest(request, aContext, status);
+    mObserver->OnStopRequest(request, status);
   }
 
   return rv;
 }
 
 /*******************************************************************
   Here come the tokenization methods...
  *******************************************************************/
--- a/security/manager/ssl/ContentSignatureVerifier.cpp
+++ b/security/manager/ssl/ContentSignatureVerifier.cpp
@@ -522,17 +522,16 @@ nsresult ContentSignatureVerifier::Parse
 NS_IMETHODIMP
 ContentSignatureVerifier::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(NS_IsMainThread());
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ContentSignatureVerifier::OnStopRequest(nsIRequest* aRequest,
-                                        nsISupports* aContext,
                                         nsresult aStatus) {
   MOZ_ASSERT(NS_IsMainThread());
   nsCOMPtr<nsIContentSignatureReceiverCallback> callback;
   callback.swap(mCallback);
   nsresult rv;
 
   // Check HTTP status code and return if it's not 200.
   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(aRequest, &rv);
--- a/security/manager/ssl/PSMContentListener.cpp
+++ b/security/manager/ssl/PSMContentListener.cpp
@@ -131,17 +131,16 @@ PSMContentStreamListener::OnDataAvailabl
   }
 
   mByteData.Append(chunk);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PSMContentStreamListener::OnStopRequest(nsIRequest* request,
-                                        nsISupports* context,
                                         nsresult aStatus) {
   MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("CertDownloader::OnStopRequest\n"));
 
   // Because importing the cert can spin the event loop (via alerts), we can't
   // do it here. Do it off the event loop instead.
   nsCOMPtr<nsIRunnable> r =
       NewRunnableMethod("psm::PSMContentStreamListener::ImportCertificate",
                         this, &PSMContentStreamListener::ImportCertificate);
@@ -228,18 +227,18 @@ mozilla::ipc::IPCResult PSMContentDownlo
   if (mIPCOpen) {
     mozilla::Unused << Send__delete__(this);
   }
   return IPC_OK();
 }
 
 NS_IMETHODIMP
 PSMContentDownloaderParent::OnStopRequest(nsIRequest* request,
-                                          nsISupports* context, nsresult code) {
-  nsresult rv = PSMContentStreamListener::OnStopRequest(request, context, code);
+                                          nsresult code) {
+  nsresult rv = PSMContentStreamListener::OnStopRequest(request, code);
 
   if (mIPCOpen) {
     mozilla::Unused << Send__delete__(this);
   }
   return rv;
 }
 
 mozilla::ipc::IPCResult PSMContentDownloaderParent::RecvDivertToParentUsing(
@@ -301,17 +300,16 @@ PSMContentDownloaderChild::OnDataAvailab
   }
 
   mozilla::Unused << SendOnDataAvailable(chunk, aSourceOffset, aLength);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PSMContentDownloaderChild::OnStopRequest(nsIRequest* request,
-                                         nsISupports* context,
                                          nsresult aStatus) {
   mozilla::Unused << SendOnStopRequest(aStatus);
   return NS_OK;
 }
 
 /* ------------------------
  * PSMContentListener
  * ------------------------ */
--- a/security/manager/ssl/PSMContentListener.h
+++ b/security/manager/ssl/PSMContentListener.h
@@ -60,17 +60,17 @@ class PSMContentDownloaderParent : publi
   mozilla::ipc::IPCResult RecvOnDataAvailable(const nsCString &data,
                                               const uint64_t &offset,
                                               const uint32_t &count);
   mozilla::ipc::IPCResult RecvOnStopRequest(const nsresult &code);
 
   // We inherit most of nsIStreamListener from PSMContentStreamListener, but
   // we have to override OnStopRequest to know when we're done with our IPC
   // ref.
-  NS_IMETHOD OnStopRequest(nsIRequest *request, nsISupports *aContext,
+  NS_IMETHOD OnStopRequest(nsIRequest *request,
                            nsresult code) override;
 
   mozilla::ipc::IPCResult RecvDivertToParentUsing(
       mozilla::net::PChannelDiverterParent *diverter);
 
  protected:
   virtual ~PSMContentDownloaderParent();
 
--- a/toolkit/components/extensions/webrequest/ChannelWrapper.cpp
+++ b/toolkit/components/extensions/webrequest/ChannelWrapper.cpp
@@ -931,25 +931,24 @@ ChannelWrapper::RequestListener::OnStart
   mChannelWrapper->ErrorCheck();
   mChannelWrapper->FireEvent(NS_LITERAL_STRING("start"));
 
   return mOrigStreamListener->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
 ChannelWrapper::RequestListener::OnStopRequest(nsIRequest* request,
-                                               nsISupports* aCtxt,
                                                nsresult aStatus) {
   MOZ_ASSERT(mOrigStreamListener, "Should have mOrigStreamListener");
 
   mChannelWrapper->mChannelEntry = nullptr;
   mChannelWrapper->ErrorCheck();
   mChannelWrapper->FireEvent(NS_LITERAL_STRING("stop"));
 
-  return mOrigStreamListener->OnStopRequest(request, aCtxt, aStatus);
+  return mOrigStreamListener->OnStopRequest(request, aStatus);
 }
 
 NS_IMETHODIMP
 ChannelWrapper::RequestListener::OnDataAvailable(nsIRequest* request,
                                                  nsISupports* aCtxt,
                                                  nsIInputStream* inStr,
                                                  uint64_t sourceOffset,
                                                  uint32_t count) {
--- a/toolkit/components/extensions/webrequest/StreamFilterParent.cpp
+++ b/toolkit/components/extensions/webrequest/StreamFilterParent.cpp
@@ -497,17 +497,17 @@ StreamFilterParent::OnStartRequest(nsIRe
       }
     });
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
-StreamFilterParent::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+StreamFilterParent::OnStopRequest(nsIRequest* aRequest,
                                   nsresult aStatusCode) {
   AssertIsMainThread();
 
   mReceivedStop = true;
   if (mDisconnected) {
     return EmitStopRequest(aStatusCode);
   }
 
@@ -520,17 +520,17 @@ StreamFilterParent::OnStopRequest(nsIReq
   return NS_OK;
 }
 
 nsresult StreamFilterParent::EmitStopRequest(nsresult aStatusCode) {
   AssertIsMainThread();
   MOZ_ASSERT(!mSentStop);
 
   mSentStop = true;
-  nsresult rv = mOrigListener->OnStopRequest(mChannel, mContext, aStatusCode);
+  nsresult rv = mOrigListener->OnStopRequest(mChannel, aStatusCode);
 
   if (mLoadGroup && !mDisconnected) {
     Unused << mLoadGroup->RemoveRequest(this, nullptr, aStatusCode);
   }
 
   return rv;
 }
 
--- a/toolkit/components/places/FaviconHelpers.cpp
+++ b/toolkit/components/places/FaviconHelpers.cpp
@@ -677,17 +677,16 @@ AsyncFetchAndSetIconForPage::AsyncOnChan
   // If we've been canceled, stop the redirect with NS_BINDING_ABORTED, and
   // handle the cancel on the original channel.
   (void)cb->OnRedirectVerifyCallback(mCanceled ? NS_BINDING_ABORTED : NS_OK);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 AsyncFetchAndSetIconForPage::OnStopRequest(nsIRequest* aRequest,
-                                           nsISupports* aContext,
                                            nsresult aStatusCode) {
   MOZ_ASSERT(NS_IsMainThread());
 
   // Don't need to track this anymore.
   mRequest = nullptr;
   if (mCanceled) {
     return NS_OK;
   }
--- a/toolkit/components/places/nsAnnoProtocolHandler.cpp
+++ b/toolkit/components/places/nsAnnoProtocolHandler.cpp
@@ -153,17 +153,17 @@ class faviconAsyncLoader : public AsyncS
     // Fallback to the default favicon.
     // we should pass the loadInfo of the original channel along
     // to the new channel. Note that mChannel can not be null,
     // constructor checks that.
     nsCOMPtr<nsIChannel> newChannel;
     rv = GetDefaultIcon(mChannel, getter_AddRefs(newChannel));
     if (NS_FAILED(rv)) {
       mListener->OnStartRequest(mChannel);
-      mListener->OnStopRequest(mChannel, nullptr, rv);
+      mListener->OnStopRequest(mChannel, rv);
       return rv;
     }
     return newChannel->AsyncOpen(mListener);
   }
 
  protected:
   virtual ~faviconAsyncLoader() {}
 
--- a/toolkit/components/reputationservice/ApplicationReputation.cpp
+++ b/toolkit/components/reputationservice/ApplicationReputation.cpp
@@ -1672,17 +1672,17 @@ PendingLookup::OnDataAvailable(nsIReques
 }
 
 NS_IMETHODIMP
 PendingLookup::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-PendingLookup::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+PendingLookup::OnStopRequest(nsIRequest* aRequest,
                              nsresult aResult) {
   NS_ENSURE_STATE(mCallback);
 
   if (aResult != NS_ERROR_NET_TIMEOUT) {
     Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_REMOTE_LOOKUP_TIMEOUT,
                false);
 
     MOZ_ASSERT(mTelemetryRemoteRequestStartMs > 0);
@@ -1693,17 +1693,17 @@ PendingLookup::OnStopRequest(nsIRequest*
     mozilla::Telemetry::Accumulate(
         mozilla::Telemetry::APPLICATION_REPUTATION_REMOTE_LOOKUP_RESPONSE_TIME,
         msecs);
   }
 
   uint32_t verdict = nsIApplicationReputationService::VERDICT_SAFE;
   Reason reason = Reason::NotSet;
   nsresult rv =
-      OnStopRequestInternal(aRequest, aContext, aResult, verdict, reason);
+      OnStopRequestInternal(aRequest, nullptr, aResult, verdict, reason);
   OnComplete(verdict, reason, rv);
   return rv;
 }
 
 nsresult PendingLookup::OnStopRequestInternal(nsIRequest* aRequest,
                                               nsISupports* aContext,
                                               nsresult aResult,
                                               uint32_t& aVerdict,
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -1873,17 +1873,16 @@ ThreatHitReportListener::OnDataAvailable
                                          nsISupports* aContext,
                                          nsIInputStream* aInputStream,
                                          uint64_t aOffset, uint32_t aCount) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ThreatHitReportListener::OnStopRequest(nsIRequest* aRequest,
-                                       nsISupports* aContext,
                                        nsresult aStatus) {
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest);
   NS_ENSURE_TRUE(httpChannel, aStatus);
 
   uint8_t netErrCode =
       NS_FAILED(aStatus) ? mozilla::safebrowsing::NetworkErrorToBucket(aStatus)
                          : 0;
   mozilla::Telemetry::Accumulate(
--- a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
@@ -690,17 +690,16 @@ nsUrlClassifierStreamUpdater::OnDataAvai
   rv = mDBService->UpdateStream(chunk);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsUrlClassifierStreamUpdater::OnStopRequest(nsIRequest *request,
-                                            nsISupports *context,
                                             nsresult aStatus) {
   if (!mDBService) return NS_ERROR_NOT_INITIALIZED;
 
   if (LOG_ENABLED()) {
     nsAutoCString errorName;
     mozilla::GetErrorName(aStatus, errorName);
     LOG(("OnStopRequest (status %s, beganStream %s, this=%p)", errorName.get(),
          mBeganStream ? "true" : "false", this));
--- a/uriloader/base/nsDocLoader.cpp
+++ b/uriloader/base/nsDocLoader.cpp
@@ -439,17 +439,17 @@ nsDocLoader::OnStartRequest(nsIRequest* 
     extraFlags = nsIWebProgressListener::STATE_IS_REDIRECTED_DOCUMENT;
   }
   doStartURLLoad(request, extraFlags);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDocLoader::OnStopRequest(nsIRequest* aRequest, nsISupports* aCtxt,
+nsDocLoader::OnStopRequest(nsIRequest* aRequest,
                            nsresult aStatus) {
   nsresult rv = NS_OK;
 
   if (MOZ_LOG_TEST(gDocLoaderLog, LogLevel::Debug)) {
     nsAutoCString name;
     aRequest->GetName(name);
 
     uint32_t count = 0;
--- a/uriloader/base/nsURILoader.cpp
+++ b/uriloader/base/nsURILoader.cpp
@@ -343,28 +343,27 @@ nsDocumentOpenInfo::OnDataAvailable(nsIR
 
   if (m_targetStreamListener)
     rv = m_targetStreamListener->OnDataAvailable(request, aCtxt, inStr,
                                                  sourceOffset, count);
   return rv;
 }
 
 NS_IMETHODIMP nsDocumentOpenInfo::OnStopRequest(nsIRequest* request,
-                                                nsISupports* aCtxt,
                                                 nsresult aStatus) {
   LOG(("[0x%p] nsDocumentOpenInfo::OnStopRequest", this));
 
   if (m_targetStreamListener) {
     nsCOMPtr<nsIStreamListener> listener(m_targetStreamListener);
 
     // If this is a multipart stream, we could get another
     // OnStartRequest after this... reset state.
     m_targetStreamListener = nullptr;
     mContentType.Truncate();
-    listener->OnStopRequest(request, aCtxt, aStatus);
+    listener->OnStopRequest(request, aStatus);
   }
 
   // Remember...
   // In the case of multiplexed streams (such as multipart/x-mixed-replace)
   // these stream listener methods could be called again :-)
   //
   return NS_OK;
 }
--- a/uriloader/exthandler/ExternalHelperAppChild.cpp
+++ b/uriloader/exthandler/ExternalHelperAppChild.cpp
@@ -85,21 +85,21 @@ ExternalHelperAppChild::OnStartRequest(n
   if (resumable) {
     resumable->GetEntityID(entityID);
   }
   SendOnStartRequest(entityID, tabChild);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-ExternalHelperAppChild::OnStopRequest(nsIRequest *request, nsISupports *ctx,
+ExternalHelperAppChild::OnStopRequest(nsIRequest *request,
                                       nsresult status) {
   // mHandler can be null if we diverted the request to the parent
   if (mHandler) {
-    nsresult rv = mHandler->OnStopRequest(request, ctx, status);
+    nsresult rv = mHandler->OnStopRequest(request, status);
     SendOnStopRequest(status);
     NS_ENSURE_SUCCESS(rv, NS_ERROR_UNEXPECTED);
   }
 
   return NS_OK;
 }
 
 nsresult ExternalHelperAppChild::DivertToParent(
--- a/uriloader/exthandler/ExternalHelperAppParent.cpp
+++ b/uriloader/exthandler/ExternalHelperAppParent.cpp
@@ -162,17 +162,17 @@ mozilla::ipc::IPCResult ExternalHelperAp
 
 mozilla::ipc::IPCResult ExternalHelperAppParent::RecvOnStopRequest(
     const nsresult& code) {
   MOZ_ASSERT(!mDiverted,
              "child forwarding callbacks after request was diverted");
 
   mPending = false;
   mListener->OnStopRequest(
-      this, nullptr,
+      this,
       (NS_SUCCEEDED(code) && NS_FAILED(mStatus)) ? mStatus : code);
   Delete();
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult ExternalHelperAppParent::RecvDivertToParentUsing(
     PChannelDiverterParent* diverter, PBrowserParent* contentContext) {
   MOZ_ASSERT(diverter);
@@ -200,20 +200,20 @@ ExternalHelperAppParent::OnDataAvailable
 
 NS_IMETHODIMP
 ExternalHelperAppParent::OnStartRequest(nsIRequest* request) {
   MOZ_ASSERT(mDiverted);
   return mListener->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
-ExternalHelperAppParent::OnStopRequest(nsIRequest* request, nsISupports* ctx,
+ExternalHelperAppParent::OnStopRequest(nsIRequest* request,
                                        nsresult status) {
   MOZ_ASSERT(mDiverted);
-  nsresult rv = mListener->OnStopRequest(request, ctx, status);
+  nsresult rv = mListener->OnStopRequest(request, status);
   Delete();
   return rv;
 }
 
 ExternalHelperAppParent::~ExternalHelperAppParent() {}
 
 //
 // nsIRequest implementation...
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -1919,17 +1919,16 @@ nsExternalAppHandler::OnDataAvailable(ns
       // Cancel the download.
       Cancel(rv);
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsExternalAppHandler::OnStopRequest(nsIRequest* request,
-                                                  nsISupports* aCtxt,
                                                   nsresult aStatus) {
   LOG(
       ("nsExternalAppHandler::OnStopRequest\n"
        "  mCanceled=%d, mTransfer=0x%p, aStatus=0x%08" PRIX32 "\n",
        mCanceled, mTransfer.get(), static_cast<uint32_t>(aStatus)));
 
   mStopRequestIssued = true;
 
--- a/uriloader/exthandler/nsExternalProtocolHandler.cpp
+++ b/uriloader/exthandler/nsExternalProtocolHandler.cpp
@@ -173,17 +173,17 @@ nsresult nsExtProtocolChannel::OpenURL()
     if (NS_SUCCEEDED(rv) && mListener) {
       Cancel(NS_ERROR_NO_CONTENT);
 
       RefPtr<nsExtProtocolChannel> self = this;
       nsCOMPtr<nsIStreamListener> listener = mListener;
       MessageLoop::current()->PostTask(NS_NewRunnableFunction(
           "nsExtProtocolChannel::OpenURL", [self, listener]() {
             listener->OnStartRequest(self);
-            listener->OnStopRequest(self, nullptr, self->mStatus);
+            listener->OnStopRequest(self, self->mStatus);
           }));
     }
   }
 
 finish:
   mCallbacks = nullptr;
   mListener = nullptr;
   return rv;
@@ -423,17 +423,16 @@ NS_IMETHODIMP nsExtProtocolChannel::Dele
 
 NS_IMETHODIMP nsExtProtocolChannel::OnStartRequest(nsIRequest *aRequest) {
   // no data is expected
   MOZ_CRASH("No data expected from external protocol channel");
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP nsExtProtocolChannel::OnStopRequest(nsIRequest *aRequest,
-                                                  nsISupports *aContext,
                                                   nsresult aStatusCode) {
   // no data is expected
   MOZ_CRASH("No data expected from external protocol channel");
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP nsExtProtocolChannel::OnDataAvailable(
     nsIRequest *aRequest, nsISupports *aContext, nsIInputStream *aInputStream,
--- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp
+++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp
@@ -220,17 +220,17 @@ nsManifestCheck::OnDataAvailable(nsIRequ
                                  nsIInputStream *aStream, uint64_t aOffset,
                                  uint32_t aCount) {
   uint32_t bytesRead;
   aStream->ReadSegments(ReadManifest, this, aCount, &bytesRead);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsManifestCheck::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+nsManifestCheck::OnStopRequest(nsIRequest *aRequest,
                                nsresult aStatus) {
   nsAutoCString manifestHash;
   if (NS_SUCCEEDED(aStatus)) {
     mManifestHash->Finish(true, manifestHash);
   }
 
   mUpdate->ManifestCheckCompleted(aStatus, manifestHash);
 
@@ -410,17 +410,16 @@ nsOfflineCacheUpdateItem::OnDataAvailabl
 
   mUpdate->OnByteProgress(bytesRead);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOfflineCacheUpdateItem::OnStopRequest(nsIRequest *aRequest,
-                                        nsISupports *aContext,
                                         nsresult aStatus) {
   if (LOG_ENABLED()) {
     LOG(("%p: Done fetching offline item %s [status=%" PRIx32 "]\n", this,
          mURI->GetSpecOrDefault().get(), static_cast<uint32_t>(aStatus)));
   }
 
   if (mBytesRead == 0 && aStatus == NS_OK) {
     // we didn't need to read (because LOAD_ONLY_IF_MODIFIED was
@@ -1080,34 +1079,34 @@ nsOfflineManifestItem::OnDataAvailable(n
   // All the parent method does is read and discard, don't bother
   // chaining up.
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOfflineManifestItem::OnStopRequest(nsIRequest *aRequest,
-                                     nsISupports *aContext, nsresult aStatus) {
+                                     nsresult aStatus) {
   if (mBytesRead == 0) {
     // We didn't need to read (because LOAD_ONLY_IF_MODIFIED was
     // specified).
     mNeedsUpdate = false;
   } else {
     // Handle any leftover manifest data.
     nsCString::const_iterator begin, end;
     mReadBuf.BeginReading(begin);
     mReadBuf.EndReading(end);
     nsresult rv = HandleManifestLine(begin, end);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = CheckNewManifestContentHash(aRequest);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  return nsOfflineCacheUpdateItem::OnStopRequest(aRequest, aContext, aStatus);
+  return nsOfflineCacheUpdateItem::OnStopRequest(aRequest, aStatus);
 }
 
 //-----------------------------------------------------------------------------
 // nsOfflineCacheUpdate::nsISupports
 //-----------------------------------------------------------------------------
 
 NS_IMPL_ISUPPORTS(nsOfflineCacheUpdate, nsIOfflineCacheUpdateObserver,
                   nsIOfflineCacheUpdate, nsIRunnable)
--- a/uriloader/prefetch/nsPrefetchService.cpp
+++ b/uriloader/prefetch/nsPrefetchService.cpp
@@ -238,17 +238,17 @@ nsPrefetchNode::OnDataAvailable(nsIReque
   uint32_t bytesRead = 0;
   aStream->ReadSegments(NS_DiscardSegment, nullptr, aCount, &bytesRead);
   mBytesRead += bytesRead;
   LOG(("prefetched %u bytes [offset=%" PRIu64 "]\n", bytesRead, aOffset));
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrefetchNode::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
+nsPrefetchNode::OnStopRequest(nsIRequest *aRequest,
                               nsresult aStatus) {
   LOG(("done prefetching [status=%" PRIx32 "]\n",
        static_cast<uint32_t>(aStatus)));
 
   if (mBytesRead == 0 && aStatus == NS_OK && mChannel) {
     // we didn't need to read (because LOAD_ONLY_IF_MODIFIED was
     // specified), but the object should report loadedSize as if it
     // did.
--- a/widget/android/WebExecutorSupport.cpp
+++ b/widget/android/WebExecutorSupport.cpp
@@ -193,17 +193,17 @@ class LoaderListener final : public nsIS
       CompleteWithError(mResult, rv);
       return NS_OK;
     }
 
     return NS_OK;
   }
 
   NS_IMETHOD
-  OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
+  OnStopRequest(nsIRequest* aRequest,
                 nsresult aStatusCode) override {
     if (mStream) {
       mStream->SendEof();
     }
     return NS_OK;
   }
 
   NS_IMETHOD