Bug 1525319 - Removing context from OnStartRequest r=valentin
authorJonathan Kingston <jkt@mozilla.com>
Wed, 27 Feb 2019 23:41:04 +0000
changeset 461558 b5f7ff4ca9b58d002c2bebe0a11b529680068b0c
parent 461557 cce8077b2174bc21e2ab776a40fbb541635d050c
child 461559 c48f47f793c0f0d9b4acf2caf9324b8bd7a5a683
push id35625
push usercsabou@mozilla.com
push dateThu, 28 Feb 2019 10:55:23 +0000
treeherdermozilla-central@fd53d5e80bca [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 OnStartRequest r=valentin Differential Revision: https://phabricator.services.mozilla.com/D20769
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/html/PluginDocument.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/ImageFactory.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
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
widget/windows/nsDataObj.cpp
--- a/docshell/base/nsPingListener.cpp
+++ b/docshell/base/nsPingListener.cpp
@@ -323,17 +323,17 @@ nsresult nsPingListener::StartTimeout(Do
 
   return NS_NewTimerWithFuncCallback(
       getter_AddRefs(mTimer), OnPingTimeout, mLoadGroup, PING_TIMEOUT,
       nsITimer::TYPE_ONE_SHOT, "nsPingListener::StartTimeout",
       aDocGroup->EventTargetFor(TaskCategory::Network));
 }
 
 NS_IMETHODIMP
-nsPingListener::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+nsPingListener::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPingListener::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
                                 nsIInputStream* aStream, uint64_t aOffset,
                                 uint32_t aCount) {
   uint32_t result;
--- a/dom/base/DOMParser.cpp
+++ b/dom/base/DOMParser.cpp
@@ -193,17 +193,17 @@ already_AddRefed<Document> DOMParser::Pa
   if (NS_FAILED(rv) || !listener) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   // Now start pumping data to the listener
   nsresult status;
 
-  rv = listener->OnStartRequest(parserChannel, nullptr);
+  rv = listener->OnStartRequest(parserChannel);
   if (NS_FAILED(rv)) parserChannel->Cancel(rv);
   parserChannel->GetStatus(&status);
 
   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);
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -871,18 +871,17 @@ nsresult ExternalResourceMap::AddExterna
 
   return rv;
 }
 
 NS_IMPL_ISUPPORTS(ExternalResourceMap::PendingLoad, nsIStreamListener,
                   nsIRequestObserver)
 
 NS_IMETHODIMP
-ExternalResourceMap::PendingLoad::OnStartRequest(nsIRequest* aRequest,
-                                                 nsISupports* aContext) {
+ExternalResourceMap::PendingLoad::OnStartRequest(nsIRequest* aRequest) {
   ExternalResourceMap& map = mDisplayDocument->ExternalResourceMap();
   if (map.HaveShutDown()) {
     return NS_BINDING_ABORTED;
   }
 
   nsCOMPtr<nsIContentViewer> viewer;
   nsCOMPtr<nsILoadGroup> loadGroup;
   nsresult rv =
@@ -894,17 +893,17 @@ ExternalResourceMap::PendingLoad::OnStar
   if (NS_FAILED(rv)) {
     return rv;
   }
   if (NS_FAILED(rv2)) {
     mTargetListener = nullptr;
     return rv2;
   }
 
-  return mTargetListener->OnStartRequest(aRequest, aContext);
+  return mTargetListener->OnStartRequest(aRequest);
 }
 
 nsresult ExternalResourceMap::PendingLoad::SetupViewer(
     nsIRequest* aRequest, nsIContentViewer** aViewer,
     nsILoadGroup** aLoadGroup) {
   MOZ_ASSERT(!mTargetListener, "Unexpected call to OnStartRequest");
   *aViewer = nullptr;
   *aLoadGroup = nullptr;
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -596,17 +596,17 @@ EventSourceImpl::Observe(nsISupports* aS
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // EventSourceImpl::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-EventSourceImpl::OnStartRequest(nsIRequest* aRequest, nsISupports* aCtxt) {
+EventSourceImpl::OnStartRequest(nsIRequest* aRequest) {
   AssertIsOnMainThread();
   if (IsClosed()) {
     return NS_ERROR_ABORT;
   }
   nsresult rv = CheckHealthOfRequestCallback(aRequest);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest, &rv);
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1035,18 +1035,17 @@ class BeaconStreamListener final : publi
 
  private:
   nsCOMPtr<nsILoadGroup> mLoadGroup;
 };
 
 NS_IMPL_ISUPPORTS(BeaconStreamListener, nsIStreamListener, nsIRequestObserver)
 
 NS_IMETHODIMP
-BeaconStreamListener::OnStartRequest(nsIRequest* aRequest,
-                                     nsISupports* aContext) {
+BeaconStreamListener::OnStartRequest(nsIRequest* aRequest) {
   // release the loadgroup first
   mLoadGroup = nullptr;
 
   aRequest->Cancel(NS_ERROR_NET_INTERRUPT);
   return NS_BINDING_ABORTED;
 }
 
 NS_IMETHODIMP
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -925,18 +925,17 @@ void nsObjectLoadingContent::NotifyOwner
   // moved into an active document before returning to the event loop.
   if (mInstanceOwner || mInstantiating) {
     QueueCheckPluginStopEvent();
   }
 }
 
 // nsIRequestObserver
 NS_IMETHODIMP
-nsObjectLoadingContent::OnStartRequest(nsIRequest* aRequest,
-                                       nsISupports* aContext) {
+nsObjectLoadingContent::OnStartRequest(nsIRequest* aRequest) {
   AUTO_PROFILER_LABEL("nsObjectLoadingContent::OnStartRequest", NETWORK);
 
   LOG(("OBJLC [%p]: Channel OnStartRequest", this));
 
   if (aRequest != mChannel || !aRequest) {
     // happens when a new load starts before the previous one got here
     return NS_BINDING_ABORTED;
   }
@@ -947,17 +946,17 @@ nsObjectLoadingContent::OnStartRequest(n
     if (!mInstanceOwner) {
       // We drop mChannel when stopping plugins, so something is wrong
       MOZ_ASSERT_UNREACHABLE(
           "Opened a channel in plugin mode, but don't have "
           "a plugin");
       return NS_BINDING_ABORTED;
     }
     if (MakePluginListener()) {
-      return mFinalListener->OnStartRequest(aRequest, nullptr);
+      return mFinalListener->OnStartRequest(aRequest);
     }
     MOZ_ASSERT_UNREACHABLE(
         "Failed to create PluginStreamListener, aborting "
         "channel");
     return NS_BINDING_ABORTED;
   }
 
   // Otherwise we should be state loading, and call LoadObject with the channel
@@ -2214,30 +2213,30 @@ nsresult nsObjectLoadingContent::LoadObj
   rv = NS_OK;
   if (doSpawnPlugin) {
     rv = InstantiatePluginInstance(true);
     NS_ENSURE_TRUE(mIsLoading, NS_OK);
     // Create the final listener if we're loading with a channel. We can't do
     // this in the loading block above as it requires an instance.
     if (aLoadingChannel && NS_SUCCEEDED(rv)) {
       if (NS_SUCCEEDED(rv) && MakePluginListener()) {
-        rv = mFinalListener->OnStartRequest(mChannel, nullptr);
+        rv = mFinalListener->OnStartRequest(mChannel);
         if (NS_FAILED(rv)) {
           // Plugins can reject their initial stream, but continue to run.
           CloseChannel();
           NS_ENSURE_TRUE(mIsLoading, NS_OK);
           rv = NS_OK;
         }
       }
     }
   } else if (finalListener) {
     NS_ASSERTION(mType != eType_Null && mType != eType_Loading,
                  "We should not have a final listener with a non-loaded type");
     mFinalListener = finalListener;
-    rv = finalListener->OnStartRequest(mChannel, nullptr);
+    rv = finalListener->OnStartRequest(mChannel);
   }
 
   if (NS_FAILED(rv) && mIsLoading) {
     // Since we've already notified of our transition, we can just Unload and
     // call LoadFallback (which will notify again)
     mType = eType_Null;
     UnloadObject(false);
     NS_ENSURE_TRUE(mIsLoading, NS_OK);
--- a/dom/base/nsSyncLoadService.cpp
+++ b/dom/base/nsSyncLoadService.cpp
@@ -84,26 +84,25 @@ class nsForceXMLListener : public nsIStr
 nsForceXMLListener::nsForceXMLListener(nsIStreamListener *aListener)
     : mListener(aListener) {}
 
 nsForceXMLListener::~nsForceXMLListener() {}
 
 NS_IMPL_ISUPPORTS(nsForceXMLListener, nsIStreamListener, nsIRequestObserver)
 
 NS_IMETHODIMP
-nsForceXMLListener::OnStartRequest(nsIRequest *aRequest,
-                                   nsISupports *aContext) {
+nsForceXMLListener::OnStartRequest(nsIRequest *aRequest) {
   nsresult status;
   aRequest->GetStatus(&status);
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
   if (channel && NS_SUCCEEDED(status)) {
     channel->SetContentType(NS_LITERAL_CSTRING("text/xml"));
   }
 
-  return mListener->OnStartRequest(aRequest, aContext);
+  return mListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 nsForceXMLListener::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
                                   nsresult aStatusCode) {
   return mListener->OnStopRequest(aRequest, aContext, aStatusCode);
 }
 
@@ -235,18 +234,18 @@ nsresult nsSyncLoader::PushSyncStream(ns
   rv = nsSyncLoadService::PushSyncStreamToListener(in.forget(), aListener,
                                                    mChannel);
   mLoading = false;
 
   return rv;
 }
 
 NS_IMETHODIMP
-nsSyncLoader::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) {
-  return mListener->OnStartRequest(aRequest, aContext);
+nsSyncLoader::OnStartRequest(nsIRequest *aRequest) {
+  return mListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 nsSyncLoader::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
                             nsresult aStatusCode) {
   if (NS_SUCCEEDED(mAsyncLoadStatus) && NS_FAILED(aStatusCode)) {
     mAsyncLoadStatus = aStatusCode;
   }
@@ -324,17 +323,17 @@ nsresult nsSyncLoadService::PushSyncStre
     rv = NS_NewBufferedInputStream(getter_AddRefs(bufferedStream), in.forget(),
                                    chunkSize);
     NS_ENSURE_SUCCESS(rv, rv);
 
     in = bufferedStream;
   }
 
   // Load
-  rv = aListener->OnStartRequest(aChannel, nullptr);
+  rv = aListener->OnStartRequest(aChannel);
   if (NS_SUCCEEDED(rv)) {
     uint64_t sourceOffset = 0;
     while (1) {
       uint64_t readCount = 0;
       rv = in->Available(&readCount);
       if (NS_FAILED(rv) || !readCount) {
         if (rv == NS_BASE_STREAM_CLOSED) {
           // End of file, but not an error
--- a/dom/fetch/FetchDriver.cpp
+++ b/dom/fetch/FetchDriver.cpp
@@ -198,18 +198,17 @@ AlternativeDataStreamListener::GetAltern
 
 already_AddRefed<nsICacheInfoChannel>
 AlternativeDataStreamListener::GetCacheInfoChannel() {
   nsCOMPtr<nsICacheInfoChannel> channel = mCacheInfoChannel;
   return channel.forget();
 }
 
 NS_IMETHODIMP
-AlternativeDataStreamListener::OnStartRequest(nsIRequest* aRequest,
-                                              nsISupports* aContext) {
+AlternativeDataStreamListener::OnStartRequest(nsIRequest* aRequest) {
   AssertIsOnMainThread();
   MOZ_ASSERT(!mAlternativeDataType.IsEmpty());
   // Checking the alternative data type is the same between we asked and the
   // saved in the channel.
   nsAutoCString alternativeDataType;
   nsCOMPtr<nsICacheInfoChannel> cic = do_QueryInterface(aRequest);
   mStatus = AlternativeDataStreamListener::LOADING;
   if (cic && NS_SUCCEEDED(cic->GetAlternativeDataType(alternativeDataType)) &&
@@ -242,17 +241,17 @@ AlternativeDataStreamListener::OnStartRe
     // then call FetchDriver::OnStartRequest to continue the work. Unfortunately
     // can't change the stream listener to mFetchDriver, need to keep
     // AlternativeDataStreamListener alive to redirect OnDataAvailable and
     // OnStopRequest to mFetchDriver.
     MOZ_ASSERT(alternativeDataType.IsEmpty());
     mStatus = AlternativeDataStreamListener::FALLBACK;
     mAlternativeDataCacheEntryId = 0;
     MOZ_ASSERT(mFetchDriver);
-    return mFetchDriver->OnStartRequest(aRequest, aContext);
+    return mFetchDriver->OnStartRequest(aRequest);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 AlternativeDataStreamListener::OnDataAvailable(nsIRequest* aRequest,
                                                nsISupports* aContext,
                                                nsIInputStream* aInputStream,
@@ -779,17 +778,17 @@ void FetchDriver::FailWithNetworkError(n
     mObserver->OnResponseEnd(FetchDriverObserver::eByNetworking);
     mObserver = nullptr;
   }
 
   mChannel = nullptr;
 }
 
 NS_IMETHODIMP
-FetchDriver::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+FetchDriver::OnStartRequest(nsIRequest* aRequest) {
   AssertIsOnMainThread();
 
   // Note, this can be called multiple times if we are doing an opaqueredirect.
   // In that case we will get a simulated OnStartRequest() and then the real
   // channel will call in with an errored OnStartRequest().
 
   if (!mChannel) {
     MOZ_ASSERT(!mObserver);
--- a/dom/file/MutableBlobStreamListener.cpp
+++ b/dom/file/MutableBlobStreamListener.cpp
@@ -34,18 +34,17 @@ MutableBlobStreamListener::MutableBlobSt
 MutableBlobStreamListener::~MutableBlobStreamListener() {
   MOZ_ASSERT(NS_IsMainThread());
 }
 
 NS_IMPL_ISUPPORTS(MutableBlobStreamListener, nsIStreamListener,
                   nsIThreadRetargetableStreamListener, nsIRequestObserver)
 
 NS_IMETHODIMP
-MutableBlobStreamListener::OnStartRequest(nsIRequest* aRequest,
-                                          nsISupports* aContext) {
+MutableBlobStreamListener::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(!mStorage);
   MOZ_ASSERT(mEventTarget);
 
   mStorage = new MutableBlobStorage(mStorageType, mEventTarget);
   return NS_OK;
 }
 
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -598,18 +598,17 @@ HTMLMediaElement::MediaLoadListener::Obs
   nsContentUtils::UnregisterShutdownObserver(this);
 
   // Clear mElement to break cycle so we don't leak on shutdown
   mElement = nullptr;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest* aRequest,
-                                                    nsISupports* aContext) {
+HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest* aRequest) {
   nsContentUtils::UnregisterShutdownObserver(this);
 
   if (!mElement) {
     // We've been notified by the shutdown observer, and are shutting down.
     return NS_BINDING_ABORTED;
   }
 
   // Media element playback is not currently supported when recording or
@@ -676,17 +675,17 @@ HTMLMediaElement::MediaLoadListener::OnS
     return NS_BINDING_ABORTED;
   }
 
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
   if (channel &&
       NS_SUCCEEDED(rv = element->InitializeDecoderForChannel(
                        channel, getter_AddRefs(mNextListener))) &&
       mNextListener) {
-    rv = mNextListener->OnStartRequest(aRequest, aContext);
+    rv = mNextListener->OnStartRequest(aRequest);
   } else {
     // If InitializeDecoderForChannel() returned an error, fire a network error.
     if (NS_FAILED(rv) && !mNextListener) {
       // Load failed, attempt to load the next candidate resource. If there
       // are none, this will trigger a MEDIA_ERR_SRC_NOT_SUPPORTED error.
       element->NotifyLoadError(NS_LITERAL_CSTRING("Failed to init decoder"));
     }
     // If InitializeDecoderForChannel did not return a listener (but may
--- a/dom/html/ImageDocument.cpp
+++ b/dom/html/ImageDocument.cpp
@@ -63,17 +63,17 @@ class ImageListener : public MediaDocume
 };
 
 ImageListener::ImageListener(ImageDocument* aDocument)
     : MediaDocumentStreamListener(aDocument) {}
 
 ImageListener::~ImageListener() {}
 
 NS_IMETHODIMP
-ImageListener::OnStartRequest(nsIRequest* request, nsISupports* ctxt) {
+ImageListener::OnStartRequest(nsIRequest* request) {
   NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);
 
   ImageDocument* imgDoc = static_cast<ImageDocument*>(mDocument.get());
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
   if (!channel) {
     return NS_ERROR_FAILURE;
   }
 
@@ -119,17 +119,17 @@ ImageListener::OnStartRequest(nsIRequest
         do_QueryInterface(imgDoc->mImageContent);
     NS_ENSURE_TRUE(imageLoader, NS_ERROR_UNEXPECTED);
 
     imageLoader->AddNativeObserver(imgDoc);
     imgDoc->mObservingImageLoader = true;
     imageLoader->LoadImageWithChannel(channel, getter_AddRefs(mNextStream));
   }
 
-  return MediaDocumentStreamListener::OnStartRequest(request, ctxt);
+  return MediaDocumentStreamListener::OnStartRequest(request);
 }
 
 NS_IMETHODIMP
 ImageListener::OnStopRequest(nsIRequest* aRequest, nsISupports* aCtxt,
                              nsresult aStatus) {
   ImageDocument* imgDoc = static_cast<ImageDocument*>(mDocument.get());
   nsContentUtils::DispatchChromeEvent(imgDoc, ToSupports(imgDoc),
                                       NS_LITERAL_STRING("ImageContentLoaded"),
--- a/dom/html/MediaDocument.cpp
+++ b/dom/html/MediaDocument.cpp
@@ -44,24 +44,23 @@ NS_IMPL_ISUPPORTS(MediaDocumentStreamLis
                   nsIStreamListener, nsIThreadRetargetableStreamListener)
 
 void MediaDocumentStreamListener::SetStreamListener(
     nsIStreamListener* aListener) {
   mNextStream = aListener;
 }
 
 NS_IMETHODIMP
-MediaDocumentStreamListener::OnStartRequest(nsIRequest* request,
-                                            nsISupports* ctxt) {
+MediaDocumentStreamListener::OnStartRequest(nsIRequest* request) {
   NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);
 
   mDocument->StartLayout();
 
   if (mNextStream) {
-    return mNextStream->OnStartRequest(request, ctxt);
+    return mNextStream->OnStartRequest(request);
   }
 
   return NS_ERROR_PARSED_DATA_CACHED;
 }
 
 NS_IMETHODIMP
 MediaDocumentStreamListener::OnStopRequest(nsIRequest* request,
                                            nsISupports* ctxt, nsresult status) {
--- a/dom/html/PluginDocument.cpp
+++ b/dom/html/PluginDocument.cpp
@@ -66,24 +66,24 @@ class PluginDocument final : public Medi
   RefPtr<MediaDocumentStreamListener> mStreamListener;
   nsCString mMimeType;
 };
 
 class PluginStreamListener : public MediaDocumentStreamListener {
  public:
   explicit PluginStreamListener(PluginDocument* aDoc)
       : MediaDocumentStreamListener(aDoc), mPluginDoc(aDoc) {}
-  NS_IMETHOD OnStartRequest(nsIRequest* request, nsISupports* ctxt) override;
+  NS_IMETHOD OnStartRequest(nsIRequest* request) override;
 
  private:
   RefPtr<PluginDocument> mPluginDoc;
 };
 
 NS_IMETHODIMP
-PluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports* ctxt) {
+PluginStreamListener::OnStartRequest(nsIRequest* request) {
   AUTO_PROFILER_LABEL("PluginStreamListener::OnStartRequest", NETWORK);
 
   nsCOMPtr<nsIContent> embed = mPluginDoc->GetPluginContent();
   nsCOMPtr<nsIObjectLoadingContent> objlc = do_QueryInterface(embed);
   nsCOMPtr<nsIStreamListener> objListener = do_QueryInterface(objlc);
 
   if (!objListener) {
     MOZ_ASSERT_UNREACHABLE(
@@ -99,17 +99,17 @@ PluginStreamListener::OnStartRequest(nsI
   nsresult rv = objlc->InitializeFromChannel(request);
   if (NS_FAILED(rv)) {
     MOZ_ASSERT_UNREACHABLE("InitializeFromChannel failed");
     return rv;
   }
 
   // Note that because we're now hooked up to a plugin listener, this will
   // likely spawn a plugin, which may re-enter.
-  return MediaDocumentStreamListener::OnStartRequest(request, ctxt);
+  return MediaDocumentStreamListener::OnStartRequest(request);
 }
 
 PluginDocument::PluginDocument() {}
 
 PluginDocument::~PluginDocument() = default;
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(PluginDocument, MediaDocument,
                                    mPluginContent)
--- 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, nullptr);
+  mListener->OnStartRequest(this);
   mListener->OnStopRequest(this, nullptr, mStatus);
 
   CleanupStrongRefs();
 }
 
 void nsJSChannel::CleanupStrongRefs() {
   mListener = nullptr;
   mOriginalInnerWindow = nullptr;
@@ -932,20 +932,20 @@ nsJSChannel::GetContentLength(int64_t* a
 }
 
 NS_IMETHODIMP
 nsJSChannel::SetContentLength(int64_t aContentLength) {
   return mStreamChannel->SetContentLength(aContentLength);
 }
 
 NS_IMETHODIMP
-nsJSChannel::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+nsJSChannel::OnStartRequest(nsIRequest* aRequest) {
   NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);
 
-  return mListener->OnStartRequest(this, aContext);
+  return mListener->OnStartRequest(this);
 }
 
 NS_IMETHODIMP
 nsJSChannel::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
                              nsIInputStream* aInputStream, uint64_t aOffset,
                              uint32_t aCount) {
   NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);
 
--- a/dom/media/ChannelMediaResource.cpp
+++ b/dom/media/ChannelMediaResource.cpp
@@ -48,18 +48,17 @@ ChannelMediaResource::~ChannelMediaResou
 // listener objects so that when we open a new stream for a seek we can
 // disconnect the old listener from the ChannelMediaResource and hook up
 // a new listener, so notifications from the old channel are discarded
 // and don't confuse us.
 NS_IMPL_ISUPPORTS(ChannelMediaResource::Listener, nsIRequestObserver,
                   nsIStreamListener, nsIChannelEventSink, nsIInterfaceRequestor,
                   nsIThreadRetargetableStreamListener)
 
-nsresult ChannelMediaResource::Listener::OnStartRequest(nsIRequest* aRequest,
-                                                        nsISupports* aContext) {
+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) {
--- a/dom/media/WebVTTListener.cpp
+++ b/dom/media/WebVTTListener.cpp
@@ -73,17 +73,17 @@ WebVTTListener::AsyncOnChannelRedirect(n
   if (mElement) {
     mElement->OnChannelRedirect(aOldChannel, aNewChannel, aFlags);
   }
   cb->OnRedirectVerifyCallback(NS_OK);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-WebVTTListener::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+WebVTTListener::OnStartRequest(nsIRequest* aRequest) {
   VTT_LOG("WebVTTListener::OnStartRequest\n");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 WebVTTListener::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                               nsresult aStatus) {
   VTT_LOG("WebVTTListener::OnStopRequest\n");
--- a/dom/network/TCPSocket.cpp
+++ b/dom/network/TCPSocket.cpp
@@ -314,17 +314,17 @@ class CopierCallbacks final : public nsI
   NS_DECL_NSIREQUESTOBSERVER
  private:
   ~CopierCallbacks() {}
 };
 
 NS_IMPL_ISUPPORTS(CopierCallbacks, nsIRequestObserver)
 
 NS_IMETHODIMP
-CopierCallbacks::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+CopierCallbacks::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 CopierCallbacks::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                                nsresult aStatus) {
   mOwner->NotifyCopyComplete(aStatus);
   mOwner = nullptr;
@@ -927,17 +927,17 @@ TCPSocket::OnInputStreamReady(nsIAsyncIn
   nsresult rv = aStream->Available(&dummy);
   if (NS_FAILED(rv)) {
     MaybeReportErrorAndCloseIfOpen(NS_ERROR_CONNECTION_REFUSED);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TCPSocket::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+TCPSocket::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TCPSocket::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
                            nsIInputStream* aStream, uint64_t aOffset,
                            uint32_t aCount) {
   if (mUseArrayBuffers) {
--- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp
+++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
@@ -100,18 +100,17 @@ nsresult nsPluginStreamListenerPeer::Ini
   }
 
   mPendingRequests = 1;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPluginStreamListenerPeer::OnStartRequest(nsIRequest* request,
-                                           nsISupports* aContext) {
+nsPluginStreamListenerPeer::OnStartRequest(nsIRequest* request) {
   nsresult rv = NS_OK;
   AUTO_PROFILER_LABEL("nsPluginStreamListenerPeer::OnStartRequest", OTHER);
 
   if (mRequests.IndexOfObject(request) == -1) {
     NS_ASSERTION(mRequests.Count() == 0,
                  "Only our initial stream should be unknown!");
     TrackRequest(request);
   }
--- a/dom/presentation/PresentationTCPSessionTransport.cpp
+++ b/dom/presentation/PresentationTCPSessionTransport.cpp
@@ -39,17 +39,17 @@ class CopierCallbacks final : public nsI
   ~CopierCallbacks() {}
 
   RefPtr<PresentationTCPSessionTransport> mOwner;
 };
 
 NS_IMPL_ISUPPORTS(CopierCallbacks, nsIRequestObserver)
 
 NS_IMETHODIMP
-CopierCallbacks::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+CopierCallbacks::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 CopierCallbacks::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                                nsresult aStatus) {
   mOwner->NotifyCopyComplete(aStatus);
   return NS_OK;
@@ -498,18 +498,17 @@ PresentationTCPSessionTransport::OnInput
     }
   }
 
   return NS_OK;
 }
 
 // nsIRequestObserver
 NS_IMETHODIMP
-PresentationTCPSessionTransport::OnStartRequest(nsIRequest* aRequest,
-                                                nsISupports* aContext) {
+PresentationTCPSessionTransport::OnStartRequest(nsIRequest* aRequest) {
   // Do nothing.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PresentationTCPSessionTransport::OnStopRequest(nsIRequest* aRequest,
                                                nsISupports* aContext,
                                                nsresult aStatusCode) {
--- a/dom/security/ContentVerifier.cpp
+++ b/dom/security/ContentVerifier.cpp
@@ -110,17 +110,17 @@ void ContentVerifier::FinishSignature() 
     }
   }
 
   // propagate OnStopRequest and return
   nextListener->OnStopRequest(mContentRequest, mContentContext, rv);
 }
 
 NS_IMETHODIMP
-ContentVerifier::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+ContentVerifier::OnStartRequest(nsIRequest* aRequest) {
   MOZ_CRASH("This OnStartRequest should've never been called!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ContentVerifier::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                                nsresult aStatus) {
   // If we don't have a next listener, we handed off this request already.
--- a/dom/security/nsCSPContext.cpp
+++ b/dom/security/nsCSPContext.cpp
@@ -1607,18 +1607,17 @@ CSPViolationReportListener::OnDataAvaila
 NS_IMETHODIMP
 CSPViolationReportListener::OnStopRequest(nsIRequest* aRequest,
                                           nsISupports* aContext,
                                           nsresult aStatus) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-CSPViolationReportListener::OnStartRequest(nsIRequest* aRequest,
-                                           nsISupports* aContext) {
+CSPViolationReportListener::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 /* ========== CSPReportRedirectSink implementation ========== */
 
 NS_IMPL_ISUPPORTS(CSPReportRedirectSink, nsIChannelEventSink,
                   nsIInterfaceRequestor);
 
--- a/dom/serviceworkers/ServiceWorkerScriptCache.cpp
+++ b/dom/serviceworkers/ServiceWorkerScriptCache.cpp
@@ -784,17 +784,17 @@ void CompareNetwork::Abort() {
     if (mCC) {
       mCC->Abort();
       mCC = nullptr;
     }
   }
 }
 
 NS_IMETHODIMP
-CompareNetwork::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+CompareNetwork::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (mState == Finished) {
     return NS_OK;
   }
 
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
   MOZ_ASSERT_IF(mIsMainScript, channel == mChannel);
--- a/dom/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/dom/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -729,18 +729,17 @@ nsWebBrowserPersist::OnWrite::OnFinish(n
                         &nsWebBrowserPersist::SerializeNextFile));
   return NS_OK;
 }
 
 //*****************************************************************************
 // nsWebBrowserPersist::nsIRequestObserver
 //*****************************************************************************
 
-NS_IMETHODIMP nsWebBrowserPersist::OnStartRequest(nsIRequest *request,
-                                                  nsISupports *ctxt) {
+NS_IMETHODIMP nsWebBrowserPersist::OnStartRequest(nsIRequest *request) {
   if (mProgressListener) {
     uint32_t stateFlags = nsIWebProgressListener::STATE_START |
                           nsIWebProgressListener::STATE_IS_REQUEST;
     if (!mSavingDocument) {
       stateFlags |= nsIWebProgressListener::STATE_IS_NETWORK;
     }
     mProgressListener->OnStateChange(nullptr, request, stateFlags, NS_OK);
   }
--- a/dom/workers/ScriptLoader.cpp
+++ b/dom/workers/ScriptLoader.cpp
@@ -527,17 +527,17 @@ class LoaderListener final : public nsIS
   }
 
   NS_IMETHOD
   OnStreamComplete(nsIStreamLoader* aLoader, nsISupports* aContext,
                    nsresult aStatus, uint32_t aStringLen,
                    const uint8_t* aString) override;
 
   NS_IMETHOD
-  OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) override;
+  OnStartRequest(nsIRequest* aRequest) override;
 
   NS_IMETHOD
   OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                 nsresult aStatusCode) override {
     // Nothing to do here!
     return NS_OK;
   }
 
@@ -1395,17 +1395,17 @@ NS_IMETHODIMP
 LoaderListener::OnStreamComplete(nsIStreamLoader* aLoader,
                                  nsISupports* aContext, nsresult aStatus,
                                  uint32_t aStringLen, const uint8_t* aString) {
   return mRunnable->OnStreamComplete(aLoader, mIndex, aStatus, aStringLen,
                                      aString);
 }
 
 NS_IMETHODIMP
-LoaderListener::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+LoaderListener::OnStartRequest(nsIRequest* aRequest) {
   return mRunnable->OnStartRequest(aRequest, mIndex);
 }
 
 void CachePromiseHandler::ResolvedCallback(JSContext* aCx,
                                            JS::Handle<JS::Value> aValue) {
   AssertIsOnMainThread();
   // May already have been canceled by CacheScriptLoader::Fail from
   // CancelMainThread.
--- a/dom/xbl/nsXBLService.cpp
+++ b/dom/xbl/nsXBLService.cpp
@@ -181,17 +181,17 @@ nsXBLStreamListener::OnDataAvailable(nsI
                                      uint64_t aSourceOffset, uint32_t aCount) {
   if (mInner)
     return mInner->OnDataAvailable(request, aCtxt, aInStr, aSourceOffset,
                                    aCount);
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsXBLStreamListener::OnStartRequest(nsIRequest* request, nsISupports* aCtxt) {
+nsXBLStreamListener::OnStartRequest(nsIRequest* request) {
   // Make sure we don't hold on to the sink and binding document past this point
   nsCOMPtr<nsIXMLContentSink> sink;
   mSink.swap(sink);
   nsCOMPtr<Document> doc;
   mBindingDocument.swap(doc);
 
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
   NS_ENSURE_TRUE(channel, NS_ERROR_UNEXPECTED);
@@ -203,17 +203,17 @@ nsXBLStreamListener::OnStartRequest(nsIR
       doc->StartDocumentLoad("loadAsInteractiveData", channel, group, nullptr,
                              getter_AddRefs(mInner), true, sink);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // 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, aCtxt);
+  return mInner->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
 nsXBLStreamListener::OnStopRequest(nsIRequest* request, nsISupports* aCtxt,
                                    nsresult aStatus) {
   nsresult rv = NS_OK;
   if (mInner) {
     rv = mInner->OnStopRequest(request, aCtxt, aStatus);
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -1753,24 +1753,23 @@ XMLHttpRequestMainThread::OnDataAvailabl
   if (!mFlagSynchronous && !mProgressTimerIsActive) {
     StartProgressEventTimer();
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-XMLHttpRequestMainThread::OnStartRequest(nsIRequest* request,
-                                         nsISupports* ctxt) {
+XMLHttpRequestMainThread::OnStartRequest(nsIRequest* request) {
   AUTO_PROFILER_LABEL("XMLHttpRequestMainThread::OnStartRequest", NETWORK);
 
   nsresult rv = NS_OK;
   if (!mFirstStartRequestSeen && mRequestObserver) {
     mFirstStartRequestSeen = true;
-    mRequestObserver->OnStartRequest(request, ctxt);
+    mRequestObserver->OnStartRequest(request);
   }
 
   if (request != mChannel) {
     // Can this still happen?
     return NS_OK;
   }
 
   // Don't do anything if we have been aborted
@@ -1813,17 +1812,16 @@ XMLHttpRequestMainThread::OnStartRequest
       mProgressSinceLastProgressEvent = false;
     }
 
     mUploadComplete = true;
     DispatchProgressEvent(mUpload, ProgressEventType::load, mUploadTotal,
                           mUploadTotal);
   }
 
-  mContext = ctxt;
   mFlagParseBody = true;
   ChangeState(XMLHttpRequest_Binding::HEADERS_RECEIVED);
 
   ResetResponse();
 
   if (!mOverrideMimeType.IsEmpty()) {
     channel->SetContentType(NS_ConvertUTF16toUTF8(mOverrideMimeType));
   }
@@ -2005,17 +2003,17 @@ XMLHttpRequestMainThread::OnStartRequest
                                          nullptr, getter_AddRefs(listener),
                                          !isCrossSite);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // the spec requires the response document.referrer to be the empty string
     mResponseXML->SetReferrer(NS_LITERAL_CSTRING(""));
 
     mXMLParserStreamListener = listener;
-    rv = mXMLParserStreamListener->OnStartRequest(request, ctxt);
+    rv = mXMLParserStreamListener->OnStartRequest(request);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // Download phase beginning; start the progress event timer if necessary.
   if (NS_SUCCEEDED(rv) && HasListenersFor(nsGkAtoms::onprogress)) {
     StartProgressEventTimer();
   }
 
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -216,17 +216,17 @@ txStylesheetSink::OnDataAvailable(nsIReq
     }
   }
 
   return mListener->OnDataAvailable(aRequest, mParser, aInputStream, aOffset,
                                     aCount);
 }
 
 NS_IMETHODIMP
-txStylesheetSink::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+txStylesheetSink::OnStartRequest(nsIRequest* aRequest) {
   int32_t charsetSource = kCharsetFromDocTypeDefault;
 
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
 
   // check channel's charset...
   const Encoding* encoding = nullptr;
   nsAutoCString charsetVal;
   if (NS_SUCCEEDED(channel->GetContentCharset(charsetVal))) {
@@ -260,17 +260,17 @@ txStylesheetSink::OnStartRequest(nsIRequ
       rv = serv->AsyncConvertData(UNKNOWN_CONTENT_TYPE, "*/*", mListener,
                                   mParser, getter_AddRefs(converter));
       if (NS_SUCCEEDED(rv)) {
         mListener = converter;
       }
     }
   }
 
-  return mListener->OnStartRequest(aRequest, mParser);
+  return mListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 txStylesheetSink::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                                 nsresult aStatusCode) {
   bool success = true;
 
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest);
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -1368,18 +1368,17 @@ XULDocument::CachedChromeStreamListener:
     : mDocument(aDocument), mProtoLoaded(aProtoLoaded) {}
 
 XULDocument::CachedChromeStreamListener::~CachedChromeStreamListener() {}
 
 NS_IMPL_ISUPPORTS(XULDocument::CachedChromeStreamListener, nsIRequestObserver,
                   nsIStreamListener)
 
 NS_IMETHODIMP
-XULDocument::CachedChromeStreamListener::OnStartRequest(nsIRequest* request,
-                                                        nsISupports* acontext) {
+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;
--- a/extensions/pref/autoconfig/src/nsAutoConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsAutoConfig.cpp
@@ -57,17 +57,17 @@ nsresult nsAutoConfig::Init() {
 
 nsAutoConfig::~nsAutoConfig() {}
 
 void nsAutoConfig::SetConfigURL(const char *aConfigURL) {
   mConfigURL.Assign(aConfigURL);
 }
 
 NS_IMETHODIMP
-nsAutoConfig::OnStartRequest(nsIRequest *request, nsISupports *context) {
+nsAutoConfig::OnStartRequest(nsIRequest *request) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAutoConfig::OnDataAvailable(nsIRequest *request, nsISupports *context,
                               nsIInputStream *aIStream, uint64_t aSourceOffset,
                               uint32_t aLength) {
   uint32_t amt, size;
--- a/gfx/thebes/gfxSVGGlyphs.cpp
+++ b/gfx/thebes/gfxSVGGlyphs.cpp
@@ -358,17 +358,17 @@ nsresult gfxSVGGlyphsDocument::ParseDocu
   rv = document->StartDocumentLoad("external-resource", channel,
                                    nullptr,  // aLoadGroup
                                    nullptr,  // aContainer
                                    getter_AddRefs(listener), true /* aReset */);
   if (NS_FAILED(rv) || !listener) {
     return NS_ERROR_FAILURE;
   }
 
-  rv = listener->OnStartRequest(channel, nullptr /* aContext */);
+  rv = listener->OnStartRequest(channel);
   if (NS_FAILED(rv)) {
     channel->Cancel(rv);
   }
 
   nsresult status;
   channel->GetStatus(&status);
   if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(status)) {
     rv = listener->OnDataAvailable(channel, nullptr /* aContext */, stream, 0,
--- a/image/ImageFactory.cpp
+++ b/image/ImageFactory.cpp
@@ -259,17 +259,17 @@ uint32_t GetContentSize(nsIRequest* aReq
 
   rv = newImage->Init(aMimeType.get(), aImageFlags);
   if (NS_FAILED(rv)) {
     return BadImage("VectorImage::Init failed", newImage);
   }
 
   newImage->SetInnerWindowID(aInnerWindowId);
 
-  rv = newImage->OnStartRequest(aRequest, nullptr);
+  rv = newImage->OnStartRequest(aRequest);
   if (NS_FAILED(rv)) {
     return BadImage("VectorImage::OnStartRequest failed", newImage);
   }
 
   return newImage.forget();
 }
 
 }  // namespace image
--- a/image/SVGDocumentWrapper.cpp
+++ b/image/SVGDocumentWrapper.cpp
@@ -192,22 +192,22 @@ SVGDocumentWrapper::OnDataAvailable(nsIR
                                     nsIInputStream* inStr,
                                     uint64_t sourceOffset, uint32_t count) {
   return mListener->OnDataAvailable(aRequest, ctxt, inStr, sourceOffset, count);
 }
 
 /** nsIRequestObserver methods **/
 
 NS_IMETHODIMP
-SVGDocumentWrapper::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt) {
+SVGDocumentWrapper::OnStartRequest(nsIRequest* aRequest) {
   nsresult rv = SetupViewer(aRequest, getter_AddRefs(mViewer),
                             getter_AddRefs(mLoadGroup));
 
   if (NS_SUCCEEDED(rv) &&
-      NS_SUCCEEDED(mListener->OnStartRequest(aRequest, nullptr))) {
+      NS_SUCCEEDED(mListener->OnStartRequest(aRequest))) {
     mViewer->GetDocument()->SetIsBeingUsedAsImage();
     StopAnimation();  // otherwise animations start automatically in helper doc
 
     rv = mViewer->Init(nullptr, nsIntRect(0, 0, 0, 0));
     if (NS_SUCCEEDED(rv)) {
       rv = mViewer->Open(nullptr, nullptr);
     }
   }
--- a/image/VectorImage.cpp
+++ b/image/VectorImage.cpp
@@ -1335,22 +1335,22 @@ VectorImage::GetFrameIndex(uint32_t aWhi
              : mSVGDocumentWrapper->GetCurrentTimeAsFloat();
 }
 
 //------------------------------------------------------------------------------
 // nsIRequestObserver methods
 
 //******************************************************************************
 NS_IMETHODIMP
-VectorImage::OnStartRequest(nsIRequest* aRequest, nsISupports* aCtxt) {
+VectorImage::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(!mSVGDocumentWrapper,
              "Repeated call to OnStartRequest -- can this happen?");
 
   mSVGDocumentWrapper = new SVGDocumentWrapper();
-  nsresult rv = mSVGDocumentWrapper->OnStartRequest(aRequest, aCtxt);
+  nsresult rv = mSVGDocumentWrapper->OnStartRequest(aRequest);
   if (NS_FAILED(rv)) {
     mSVGDocumentWrapper = nullptr;
     mError = true;
     return rv;
   }
 
   // Create a listener to wait until the SVG document is fully loaded, which
   // will signal that this image is ready to render. Certain error conditions
--- a/image/decoders/icon/mac/nsIconChannelCocoa.mm
+++ b/image/decoders/icon/mac/nsIconChannelCocoa.mm
@@ -69,19 +69,19 @@ nsIconChannel::Cancel(nsresult status) {
 NS_IMETHODIMP
 nsIconChannel::Suspend(void) { return mPump->Suspend(); }
 
 NS_IMETHODIMP
 nsIconChannel::Resume(void) { return mPump->Resume(); }
 
 // nsIRequestObserver methods
 NS_IMETHODIMP
-nsIconChannel::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+nsIconChannel::OnStartRequest(nsIRequest* aRequest) {
   if (mListener) {
-    return mListener->OnStartRequest(this, aContext);
+    return mListener->OnStartRequest(this);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsIconChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext, nsresult aStatus) {
   if (mListener) {
     mListener->OnStopRequest(this, aContext, aStatus);
--- a/image/decoders/icon/win/nsIconChannel.cpp
+++ b/image/decoders/icon/win/nsIconChannel.cpp
@@ -701,20 +701,19 @@ nsIconChannel::SetNotificationCallbacks(
 
 NS_IMETHODIMP
 nsIconChannel::GetSecurityInfo(nsISupports** aSecurityInfo) {
   *aSecurityInfo = nullptr;
   return NS_OK;
 }
 
 // nsIRequestObserver methods
-NS_IMETHODIMP nsIconChannel::OnStartRequest(nsIRequest* aRequest,
-                                            nsISupports* aContext) {
+NS_IMETHODIMP nsIconChannel::OnStartRequest(nsIRequest* aRequest) {
   if (mListener) {
-    return mListener->OnStartRequest(this, aContext);
+    return mListener->OnStartRequest(this);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsIconChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                              nsresult aStatus) {
   if (mListener) {
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -2638,17 +2638,17 @@ ProxyListener::ProxyListener(nsIStreamLi
 }
 
 ProxyListener::~ProxyListener() { /* destructor code */
 }
 
 /** nsIRequestObserver methods **/
 
 NS_IMETHODIMP
-ProxyListener::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt) {
+ProxyListener::OnStartRequest(nsIRequest* aRequest) {
   if (!mDestListener) {
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest));
   if (channel) {
     // We need to set the initiator type for the image load
     nsCOMPtr<nsITimedChannel> timedChannel = do_QueryInterface(channel);
@@ -2681,17 +2681,17 @@ ProxyListener::OnStartRequest(nsIRequest
           if (NS_SUCCEEDED(rv)) {
             mDestListener = fromListener;
           }
         }
       }
     }
   }
 
-  return mDestListener->OnStartRequest(aRequest, ctxt);
+  return mDestListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 ProxyListener::OnStopRequest(nsIRequest* aRequest, nsISupports* ctxt,
                              nsresult status) {
   if (!mDestListener) {
     return NS_ERROR_FAILURE;
   }
@@ -2827,17 +2827,17 @@ void imgCacheValidator::UpdateProxies(bo
       proxy->NotifyListener();
     }
   }
 }
 
 /** nsIRequestObserver methods **/
 
 NS_IMETHODIMP
-imgCacheValidator::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt) {
+imgCacheValidator::OnStartRequest(nsIRequest* aRequest) {
   // We may be holding on to a document, so ensure that it's released.
   nsCOMPtr<nsISupports> context = mContext.forget();
 
   // If for some reason we don't still have an existing request (probably
   // because OnStartRequest got delivered more than once), just bail.
   if (!mRequest) {
     MOZ_ASSERT_UNREACHABLE("OnStartRequest delivered more than once?");
     aRequest->Cancel(NS_BINDING_ABORTED);
@@ -2907,17 +2907,17 @@ imgCacheValidator::OnStartRequest(nsIReq
 
   mDestListener = new ProxyListener(mNewRequest);
 
   // Try to add the new request into the cache. Note that the entry must be in
   // 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, ctxt);
+  return mDestListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 imgCacheValidator::OnStopRequest(nsIRequest* aRequest, nsISupports* ctxt,
                                  nsresult status) {
   // Be sure we've released the document that we may have been holding on to.
   mContext = nullptr;
 
--- a/image/imgRequest.cpp
+++ b/image/imgRequest.cpp
@@ -640,17 +640,17 @@ bool imgRequest::GetMultipart() const {
 bool imgRequest::HadInsecureRedirect() const {
   MutexAutoLock lock(mMutex);
   return mHadInsecureRedirect;
 }
 
 /** nsIRequestObserver methods **/
 
 NS_IMETHODIMP
-imgRequest::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt) {
+imgRequest::OnStartRequest(nsIRequest* aRequest) {
   LOG_SCOPE(gImgLog, "imgRequest::OnStartRequest");
 
   RefPtr<Image> image;
 
   // Figure out if we're multipart.
   nsCOMPtr<nsIMultiPartChannel> multiPartChannel = do_QueryInterface(aRequest);
   MOZ_ASSERT(multiPartChannel || !mIsMultiPartChannel,
              "Stopped being multipart?");
--- a/layout/style/StreamLoader.cpp
+++ b/layout/style/StreamLoader.cpp
@@ -20,17 +20,17 @@ StreamLoader::StreamLoader(mozilla::css:
     : mSheetLoadData(aSheetLoadData), mStatus(NS_OK) {}
 
 StreamLoader::~StreamLoader() {}
 
 NS_IMPL_ISUPPORTS(StreamLoader, nsIStreamListener)
 
 /* nsIRequestObserver implementation */
 NS_IMETHODIMP
-StreamLoader::OnStartRequest(nsIRequest* aRequest, nsISupports*) {
+StreamLoader::OnStartRequest(nsIRequest* aRequest) {
   // It's kinda bad to let Web content send a number that results
   // in a potentially large allocation directly, but efficiency of
   // compression bombs is so great that it doesn't make much sense
   // to require a site to send one before going ahead and allocating.
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
   if (channel) {
     int64_t length;
     nsresult rv = channel->GetContentLength(&length);
--- a/layout/style/nsFontFaceLoader.cpp
+++ b/layout/style/nsFontFaceLoader.cpp
@@ -292,17 +292,17 @@ nsFontFaceLoader::OnStreamComplete(nsISt
     mLoadTimer = nullptr;
   }
 
   return NS_SUCCESS_ADOPTED_DATA;
 }
 
 // nsIRequestObserver
 NS_IMETHODIMP
-nsFontFaceLoader::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+nsFontFaceLoader::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsCOMPtr<nsIThreadRetargetableRequest> req = do_QueryInterface(aRequest);
   if (req) {
     nsCOMPtr<nsIEventTarget> sts =
         do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID);
     Unused << NS_WARN_IF(NS_FAILED(req->RetargetDeliveryTo(sts)));
   }
--- a/media/mtransport/ipc/WebrtcProxyChannel.cpp
+++ b/media/mtransport/ipc/WebrtcProxyChannel.cpp
@@ -326,18 +326,17 @@ WebrtcProxyChannel::OnTransportAvailable
 
   InvokeOnConnected();
 
   return NS_OK;
 }
 
 // nsIRequestObserver (from nsIStreamListener)
 NS_IMETHODIMP
-WebrtcProxyChannel::OnStartRequest(nsIRequest* aRequest,
-                                   nsISupports* aContext) {
+WebrtcProxyChannel::OnStartRequest(nsIRequest* aRequest) {
   LOG(("WebrtcProxyChannel::OnStartRequest %p\n", this));
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 WebrtcProxyChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                                   nsresult aStatusCode) {
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -525,17 +525,17 @@ nsresult nsJARChannel::CheckPendingEvent
   return NS_OK;
 }
 
 void nsJARChannel::NotifyError(nsresult aError) {
   MOZ_ASSERT(NS_FAILED(aError));
 
   mStatus = aError;
 
-  OnStartRequest(nullptr, nullptr);
+  OnStartRequest(nullptr);
   OnStopRequest(nullptr, nullptr, aError);
 }
 
 void nsJARChannel::FireOnProgress(uint64_t aProgress) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mProgressSink);
 
   mProgressSink->OnProgress(this, nullptr, aProgress, mContentLength);
@@ -979,21 +979,21 @@ nsJARChannel::GetZipEntry(nsIZipEntry **
   return reader->GetEntry(mJarEntry, aZipEntry);
 }
 
 //-----------------------------------------------------------------------------
 // nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsJARChannel::OnStartRequest(nsIRequest *req, nsISupports *ctx) {
+nsJARChannel::OnStartRequest(nsIRequest *req) {
   LOG(("nsJARChannel::OnStartRequest [this=%p %s]\n", this, mSpec.get()));
 
   mRequest = req;
-  nsresult rv = mListener->OnStartRequest(this, nullptr);
+  nsresult rv = mListener->OnStartRequest(this);
   mRequest = nullptr;
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Restrict loadable content types.
   nsAutoCString contentType;
   GetContentType(contentType);
   auto contentPolicyType = mLoadInfo->GetExternalContentPolicyType();
   if (contentType.Equals(APPLICATION_HTTP_INDEX_FORMAT) &&
--- a/modules/libjar/zipwriter/nsDeflateConverter.cpp
+++ b/modules/libjar/zipwriter/nsDeflateConverter.cpp
@@ -120,21 +120,20 @@ NS_IMETHODIMP nsDeflateConverter::OnData
       NS_ENSURE_SUCCESS(rv, rv);
       zerr = deflate(&mZstream, Z_NO_FLUSH);
     }
   }
 
   return NS_OK;
 }
 
-NS_IMETHODIMP nsDeflateConverter::OnStartRequest(nsIRequest *aRequest,
-                                                 nsISupports *aContext) {
+NS_IMETHODIMP nsDeflateConverter::OnStartRequest(nsIRequest *aRequest) {
   if (!mListener) return NS_ERROR_NOT_INITIALIZED;
 
-  return mListener->OnStartRequest(aRequest, mContext);
+  return mListener->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP nsDeflateConverter::OnStopRequest(nsIRequest *aRequest,
                                                 nsISupports *aContext,
                                                 nsresult aStatusCode) {
   if (!mListener) return NS_ERROR_NOT_INITIALIZED;
 
   nsresult rv;
--- a/modules/libjar/zipwriter/nsZipDataStream.cpp
+++ b/modules/libjar/zipwriter/nsZipDataStream.cpp
@@ -66,21 +66,20 @@ NS_IMETHODIMP nsZipDataStream::OnDataAva
   NS_ENSURE_TRUE(buffer, NS_ERROR_OUT_OF_MEMORY);
 
   nsresult rv = ZW_ReadData(aInputStream, buffer.get(), aCount);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return ProcessData(aRequest, aContext, buffer.get(), aOffset, aCount);
 }
 
-NS_IMETHODIMP nsZipDataStream::OnStartRequest(nsIRequest *aRequest,
-                                              nsISupports *aContext) {
+NS_IMETHODIMP nsZipDataStream::OnStartRequest(nsIRequest *aRequest) {
   if (!mOutput) return NS_ERROR_NOT_INITIALIZED;
 
-  return mOutput->OnStartRequest(aRequest, aContext);
+  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);
@@ -128,17 +127,17 @@ nsresult nsZipDataStream::ProcessData(ns
   mHeader->mUSize += aCount;
 
   return rv;
 }
 
 nsresult nsZipDataStream::ReadStream(nsIInputStream *aStream) {
   if (!mOutput) return NS_ERROR_NOT_INITIALIZED;
 
-  nsresult rv = OnStartRequest(nullptr, nullptr);
+  nsresult rv = OnStartRequest(nullptr);
   NS_ENSURE_SUCCESS(rv, rv);
 
   auto buffer = MakeUnique<char[]>(4096);
   NS_ENSURE_TRUE(buffer, NS_ERROR_OUT_OF_MEMORY);
 
   uint32_t read = 0;
   uint32_t offset = 0;
   do {
--- a/modules/libjar/zipwriter/nsZipWriter.cpp
+++ b/modules/libjar/zipwriter/nsZipWriter.cpp
@@ -535,17 +535,17 @@ NS_IMETHODIMP nsZipWriter::ProcessQueue(
   if (!mStream) return NS_ERROR_NOT_INITIALIZED;
   if (mInQueue) return NS_ERROR_IN_PROGRESS;
 
   mProcessObserver = aObserver;
   mProcessContext = aContext;
   mInQueue = true;
 
   if (mProcessObserver)
-    mProcessObserver->OnStartRequest(nullptr, mProcessContext);
+    mProcessObserver->OnStartRequest(nullptr);
 
   BeginProcessingNextItem();
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsZipWriter::Close() {
   if (!mStream) return NS_ERROR_NOT_INITIALIZED;
@@ -615,18 +615,17 @@ NS_IMETHODIMP nsZipWriter::Close() {
   mHeaders.Clear();
   mEntryHash.Clear();
   mQueue.Clear();
 
   return rv;
 }
 
 // Our nsIRequestObserver monitors removal operations performed on the queue
-NS_IMETHODIMP nsZipWriter::OnStartRequest(nsIRequest *aRequest,
-                                          nsISupports *aContext) {
+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);
--- a/netwerk/base/BackgroundFileSaver.cpp
+++ b/netwerk/base/BackgroundFileSaver.cpp
@@ -961,18 +961,17 @@ BackgroundFileSaverStreamListener::Backg
 bool BackgroundFileSaverStreamListener::HasInfiniteBuffer() { return true; }
 
 nsAsyncCopyProgressFun
 BackgroundFileSaverStreamListener::GetProgressCallback() {
   return AsyncCopyProgressCallback;
 }
 
 NS_IMETHODIMP
-BackgroundFileSaverStreamListener::OnStartRequest(nsIRequest *aRequest,
-                                                  nsISupports *aContext) {
+BackgroundFileSaverStreamListener::OnStartRequest(nsIRequest *aRequest) {
   NS_ENSURE_ARG(aRequest);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 BackgroundFileSaverStreamListener::OnStopRequest(nsIRequest *aRequest,
                                                  nsISupports *aContext,
--- a/netwerk/base/MemoryDownloader.cpp
+++ b/netwerk/base/MemoryDownloader.cpp
@@ -12,17 +12,17 @@ namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(MemoryDownloader, nsIStreamListener, nsIRequestObserver)
 
 MemoryDownloader::MemoryDownloader(IObserver* aObserver)
     : mObserver(aObserver), mStatus(NS_ERROR_NOT_INITIALIZED) {}
 
 NS_IMETHODIMP
-MemoryDownloader::OnStartRequest(nsIRequest* aRequest, nsISupports* aCtxt) {
+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,
--- a/netwerk/base/NetworkConnectivityService.cpp
+++ b/netwerk/base/NetworkConnectivityService.cpp
@@ -246,18 +246,17 @@ NetworkConnectivityService::RecheckIPCon
     rv = mIPv6Channel->AsyncOpen(this);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-NetworkConnectivityService::OnStartRequest(nsIRequest *aRequest,
-                                           nsISupports *aContext) {
+NetworkConnectivityService::OnStartRequest(nsIRequest *aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 NetworkConnectivityService::OnStopRequest(nsIRequest *aRequest,
                                           nsISupports *aContext,
                                           nsresult aStatusCode) {
   if (aStatusCode == NS_ERROR_ABORT) {
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -2317,18 +2317,17 @@ Predictor::OnPredictDNS(nsIURI *aURI) {
 
 // Predictor::PrefetchListener
 // nsISupports
 NS_IMPL_ISUPPORTS(Predictor::PrefetchListener, nsIStreamListener,
                   nsIRequestObserver)
 
 // nsIRequestObserver
 NS_IMETHODIMP
-Predictor::PrefetchListener::OnStartRequest(nsIRequest *aRequest,
-                                            nsISupports *aContext) {
+Predictor::PrefetchListener::OnStartRequest(nsIRequest *aRequest) {
   mStartTime = TimeStamp::Now();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 Predictor::PrefetchListener::OnStopRequest(nsIRequest *aRequest,
                                            nsISupports *aContext,
                                            nsresult aStatusCode) {
--- a/netwerk/base/SimpleChannelParent.cpp
+++ b/netwerk/base/SimpleChannelParent.cpp
@@ -72,18 +72,17 @@ NS_IMETHODIMP
 SimpleChannelParent::Delete() {
   // Nothing to do.
   return NS_OK;
 }
 
 void SimpleChannelParent::ActorDestroy(ActorDestroyReason aWhy) {}
 
 NS_IMETHODIMP
-SimpleChannelParent::OnStartRequest(nsIRequest* aRequest,
-                                    nsISupports* aContext) {
+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,
--- a/netwerk/base/nsAsyncStreamCopier.cpp
+++ b/netwerk/base/nsAsyncStreamCopier.cpp
@@ -323,17 +323,17 @@ nsAsyncStreamCopier::AsyncCopy(nsIReques
     if (NS_FAILED(rv)) return rv;
   }
 
   // from this point forward, AsyncCopy is going to return NS_OK.  any errors
   // will be reported via OnStopRequest.
   mIsPending = true;
 
   if (mObserver) {
-    rv = mObserver->OnStartRequest(AsRequest(), nullptr);
+    rv = mObserver->OnStartRequest(AsRequest());
     if (NS_FAILED(rv)) Cancel(rv);
   }
 
   if (!mShouldSniffBuffering) {
     // No buffer sniffing required, let's proceed
     AsyncCopyInternal();
     return NS_OK;
   }
--- a/netwerk/base/nsBaseChannel.cpp
+++ b/netwerk/base/nsBaseChannel.cpp
@@ -276,17 +276,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, nullptr);
+    mListener->OnStartRequest(this);
     mListener->OnStopRequest(this, nullptr, mStatus);
     ChannelDone();
   }
 
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
 
   // Drop notification callbacks to prevent cycles.
   mCallbacks = nullptr;
@@ -734,17 +734,17 @@ static void CallUnknownTypeSniffer(void 
   RefPtr<nsUnknownDecoder> sniffer = new nsUnknownDecoder();
 
   nsAutoCString detected;
   nsresult rv = sniffer->GetMIMETypeFromContent(chan, aData, aCount, detected);
   if (NS_SUCCEEDED(rv)) chan->SetContentType(detected);
 }
 
 NS_IMETHODIMP
-nsBaseChannel::OnStartRequest(nsIRequest *request, nsISupports *ctxt) {
+nsBaseChannel::OnStartRequest(nsIRequest *request) {
   MOZ_ASSERT_IF(mRequest, request == mRequest);
 
   if (mPump) {
     // If our content type is unknown, use the content type
     // sniffer. If the sniffer is not available for some reason, then we just
     // keep going as-is.
     if (NS_SUCCEEDED(mStatus) &&
         mContentType.EqualsLiteral(UNKNOWN_CONTENT_TYPE)) {
@@ -755,17 +755,17 @@ nsBaseChannel::OnStartRequest(nsIRequest
     // Now, the general type sniffers. Skip this if we have none.
     if (mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS)
       mPump->PeekStream(CallTypeSniffers, static_cast<nsIChannel *>(this));
   }
 
   SUSPEND_PUMP_FOR_SCOPE();
 
   if (mListener)  // null in case of redirect
-    return mListener->OnStartRequest(this, nullptr);
+    return mListener->OnStartRequest(this);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsBaseChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
                              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.
--- a/netwerk/base/nsDownloader.cpp
+++ b/netwerk/base/nsDownloader.cpp
@@ -31,17 +31,17 @@ NS_IMPL_ISUPPORTS(nsDownloader, nsIDownl
 NS_IMETHODIMP
 nsDownloader::Init(nsIDownloadObserver *observer, nsIFile *location) {
   mObserver = observer;
   mLocation = location;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDownloader::OnStartRequest(nsIRequest *request, nsISupports *ctxt) {
+nsDownloader::OnStartRequest(nsIRequest *request) {
   nsresult rv;
   if (!mLocation) {
     nsCOMPtr<nsIFile> location;
     rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(location));
     if (NS_FAILED(rv)) return rv;
 
     char buf[13];
     NS_MakeRandomString(buf, 8);
--- a/netwerk/base/nsIRequestObserver.idl
+++ b/netwerk/base/nsIRequestObserver.idl
@@ -12,23 +12,21 @@ interface nsIRequest;
  */
 [scriptable, uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40)]
 interface nsIRequestObserver : nsISupports
 {
     /**
      * Called to signify the beginning of an asynchronous request.
      *
      * @param aRequest request being observed
-     * @param aContext user defined context
      *
      * An exception thrown from onStartRequest has the side-effect of
      * causing the request to be canceled.
      */
-    void onStartRequest(in nsIRequest aRequest,
-                        in nsISupports aContext);
+    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)
--- a/netwerk/base/nsIncrementalDownload.cpp
+++ b/netwerk/base/nsIncrementalDownload.cpp
@@ -177,17 +177,17 @@ void nsIncrementalDownload::UpdateProgre
     mProgressSink->OnProgress(this, mObserverContext, mCurrentSize + mChunkLen,
                               mTotalSize);
 }
 
 nsresult nsIncrementalDownload::CallOnStartRequest() {
   if (!mObserver || mDidOnStartRequest) return NS_OK;
 
   mDidOnStartRequest = true;
-  return mObserver->OnStartRequest(this, mObserverContext);
+  return mObserver->OnStartRequest(this);
 }
 
 void nsIncrementalDownload::CallOnStopRequest() {
   if (!mObserver) return;
 
   // Ensure that OnStartRequest is always called once before OnStopRequest.
   nsresult rv = CallOnStartRequest();
   if (NS_SUCCEEDED(mStatus)) mStatus = rv;
@@ -460,18 +460,17 @@ nsIncrementalDownload::Start(nsIRequestO
 
   mIsPending = true;
   return NS_OK;
 }
 
 // nsIRequestObserver
 
 NS_IMETHODIMP
-nsIncrementalDownload::OnStartRequest(nsIRequest *request,
-                                      nsISupports *context) {
+nsIncrementalDownload::OnStartRequest(nsIRequest *request) {
   nsresult rv;
 
   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(request, &rv);
   if (NS_FAILED(rv)) return rv;
 
   // Ensure that we are receiving a 206 response.
   uint32_t code;
   rv = http->GetResponseStatus(&code);
--- a/netwerk/base/nsIncrementalStreamLoader.cpp
+++ b/netwerk/base/nsIncrementalStreamLoader.cpp
@@ -46,18 +46,17 @@ nsIncrementalStreamLoader::GetNumBytesRe
 /* readonly attribute nsIRequest request; */
 NS_IMETHODIMP
 nsIncrementalStreamLoader::GetRequest(nsIRequest **aRequest) {
   NS_IF_ADDREF(*aRequest = mRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsIncrementalStreamLoader::OnStartRequest(nsIRequest *request,
-                                          nsISupports *ctxt) {
+nsIncrementalStreamLoader::OnStartRequest(nsIRequest *request) {
   nsCOMPtr<nsIChannel> chan(do_QueryInterface(request));
   if (chan) {
     int64_t contentLength = -1;
     chan->GetContentLength(&contentLength);
     if (contentLength >= 0) {
       // On 64bit platforms size of uint64_t coincides with the size of size_t,
       // so we want to compare with the minimum from size_t and int64_t.
       if (static_cast<uint64_t>(contentLength) >
@@ -68,17 +67,16 @@ nsIncrementalStreamLoader::OnStartReques
       }
 
       // preallocate buffer
       if (!mData.initCapacity(contentLength)) {
         return NS_ERROR_OUT_OF_MEMORY;
       }
     }
   }
-  mContext = ctxt;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsIncrementalStreamLoader::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
                                          nsresult aStatus) {
   AUTO_PROFILER_LABEL("nsIncrementalStreamLoader::OnStopRequest", NETWORK);
 
--- a/netwerk/base/nsInputStreamPump.cpp
+++ b/netwerk/base/nsInputStreamPump.cpp
@@ -479,17 +479,17 @@ uint32_t nsInputStreamPump::OnStateStart
     if (NS_FAILED(rv) && rv != NS_BASE_STREAM_CLOSED) mStatus = rv;
   }
 
   {
     // 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);
-    rv = mListener->OnStartRequest(this, nullptr);
+    rv = mListener->OnStartRequest(this);
   }
 
   // an error returned from OnStartRequest should cause us to abort; however,
   // we must not stomp on mStatus if already canceled.
   if (NS_FAILED(rv) && NS_SUCCEEDED(mStatus)) mStatus = rv;
 
   return NS_SUCCEEDED(mStatus) ? STATE_TRANSFER : STATE_STOP;
 }
--- a/netwerk/base/nsLoadGroup.cpp
+++ b/netwerk/base/nsLoadGroup.cpp
@@ -451,17 +451,17 @@ nsLoadGroup::AddRequest(nsIRequest *requ
     //
     nsCOMPtr<nsIRequestObserver> observer = do_QueryReferent(mObserver);
     if (observer) {
       LOG(
           ("LOADGROUP [%p]: Firing OnStartRequest for request %p."
            "(foreground count=%d).\n",
            this, request, mForegroundCount));
 
-      rv = observer->OnStartRequest(request, ctxt);
+      rv = observer->OnStartRequest(request);
       if (NS_FAILED(rv)) {
         LOG(("LOADGROUP [%p]: OnStartRequest for request %p FAILED.\n", this,
              request));
         //
         // The URI load has been canceled by the observer.  Clean up
         // the damage...
         //
 
--- a/netwerk/base/nsRequestObserverProxy.cpp
+++ b/netwerk/base/nsRequestObserverProxy.cpp
@@ -50,17 +50,17 @@ class nsOnStartRequestEvent : public nsA
     if (!mProxy->mObserver) {
       MOZ_ASSERT_UNREACHABLE(
           "already handled onStopRequest event "
           "(observer is null)");
       return NS_OK;
     }
 
     LOG(("handle startevent=%p\n", this));
-    nsresult rv = mProxy->mObserver->OnStartRequest(mRequest, mProxy->mContext);
+    nsresult rv = mProxy->mObserver->OnStartRequest(mRequest);
     if (NS_FAILED(rv)) {
       LOG(("OnStartRequest failed [rv=%" PRIx32 "] canceling request!\n",
            static_cast<uint32_t>(rv)));
       rv = mRequest->Cancel(rv);
       NS_ASSERTION(NS_SUCCEEDED(rv), "Cancel failed for request!");
     }
 
     return NS_OK;
@@ -113,19 +113,17 @@ class nsOnStopRequestEvent : public nsAR
 NS_IMPL_ISUPPORTS(nsRequestObserverProxy, nsIRequestObserver,
                   nsIRequestObserverProxy)
 
 //-----------------------------------------------------------------------------
 // nsRequestObserverProxy::nsIRequestObserver implementation...
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsRequestObserverProxy::OnStartRequest(nsIRequest *request,
-                                       nsISupports *context) {
-  MOZ_ASSERT(!context || context == mContext);
+nsRequestObserverProxy::OnStartRequest(nsIRequest *request) {
   LOG(("nsRequestObserverProxy::OnStartRequest [this=%p req=%p]\n", this,
        request));
 
   nsOnStartRequestEvent *ev = new nsOnStartRequestEvent(this, request);
   if (!ev) return NS_ERROR_OUT_OF_MEMORY;
 
   LOG(("post startevent=%p\n", ev));
   nsresult rv = FireEvent(ev);
--- a/netwerk/base/nsSimpleStreamListener.cpp
+++ b/netwerk/base/nsSimpleStreamListener.cpp
@@ -17,19 +17,18 @@ NS_IMPL_ISUPPORTS(nsSimpleStreamListener
                   nsIStreamListener, nsIRequestObserver)
 
 //
 //----------------------------------------------------------------------------
 // nsIRequestObserver implementation...
 //----------------------------------------------------------------------------
 //
 NS_IMETHODIMP
-nsSimpleStreamListener::OnStartRequest(nsIRequest *aRequest,
-                                       nsISupports *aContext) {
-  return mObserver ? mObserver->OnStartRequest(aRequest, aContext) : NS_OK;
+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)
                    : NS_OK;
 }
--- a/netwerk/base/nsStreamListenerTee.cpp
+++ b/netwerk/base/nsStreamListenerTee.cpp
@@ -7,21 +7,21 @@
 
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(nsStreamListenerTee, nsIStreamListener, nsIRequestObserver,
                   nsIStreamListenerTee, nsIThreadRetargetableStreamListener)
 
 NS_IMETHODIMP
-nsStreamListenerTee::OnStartRequest(nsIRequest *request, nsISupports *context) {
+nsStreamListenerTee::OnStartRequest(nsIRequest *request) {
   NS_ENSURE_TRUE(mListener, NS_ERROR_NOT_INITIALIZED);
-  nsresult rv1 = mListener->OnStartRequest(request, context);
+  nsresult rv1 = mListener->OnStartRequest(request);
   nsresult rv2 = NS_OK;
-  if (mObserver) rv2 = mObserver->OnStartRequest(request, context);
+  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,
                                    nsresult status) {
--- a/netwerk/base/nsStreamLoader.cpp
+++ b/netwerk/base/nsStreamLoader.cpp
@@ -48,17 +48,17 @@ nsStreamLoader::GetNumBytesRead(uint32_t
 
 NS_IMETHODIMP
 nsStreamLoader::GetRequest(nsIRequest **aRequest) {
   NS_IF_ADDREF(*aRequest = mRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsStreamLoader::OnStartRequest(nsIRequest *request, nsISupports *ctxt) {
+nsStreamLoader::OnStartRequest(nsIRequest *request) {
   nsCOMPtr<nsIChannel> chan(do_QueryInterface(request));
   if (chan) {
     int64_t contentLength = -1;
     chan->GetContentLength(&contentLength);
     if (contentLength >= 0) {
       // On 64bit platforms size of uint64_t coincides with the size of size_t,
       // so we want to compare with the minimum from size_t and int64_t.
       if (static_cast<uint64_t>(contentLength) >
@@ -68,19 +68,18 @@ nsStreamLoader::OnStartRequest(nsIReques
         return NS_ERROR_OUT_OF_MEMORY;
       }
       // preallocate buffer
       if (!mData.initCapacity(contentLength)) {
         return NS_ERROR_OUT_OF_MEMORY;
       }
     }
   }
-  mContext = ctxt;
   if (mRequestObserver) {
-    mRequestObserver->OnStartRequest(request, ctxt);
+    mRequestObserver->OnStartRequest(request);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsStreamLoader::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
                               nsresult aStatus) {
   AUTO_PROFILER_LABEL("nsStreamLoader::OnStopRequest", NETWORK);
--- a/netwerk/base/nsSyncStreamListener.cpp
+++ b/netwerk/base/nsSyncStreamListener.cpp
@@ -55,18 +55,17 @@ nsSyncStreamListener::GetInputStream(nsI
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsSyncStreamListener::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsSyncStreamListener::OnStartRequest(nsIRequest *request,
-                                     nsISupports *context) {
+nsSyncStreamListener::OnStartRequest(nsIRequest *request) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSyncStreamListener::OnDataAvailable(nsIRequest *request, nsISupports *context,
                                       nsIInputStream *stream, uint64_t offset,
                                       uint32_t count) {
   uint32_t bytesWritten;
--- a/netwerk/dns/TRR.cpp
+++ b/netwerk/dns/TRR.cpp
@@ -468,17 +468,17 @@ TRR::OnPush(nsIHttpChannel *associated, 
     return NS_ERROR_FAILURE;
   }
 
   RefPtr<TRR> trr = new TRR(mHostResolver, mPB);
   return trr->ReceivePush(pushed, mRec);
 }
 
 NS_IMETHODIMP
-TRR::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) {
+TRR::OnStartRequest(nsIRequest *aRequest) {
   LOG(("TRR::OnStartRequest %p %s %d\n", this, mHost.get(), mType));
   mStartTime = TimeStamp::Now();
   return NS_OK;
 }
 
 static uint16_t get16bit(unsigned char *aData, int index) {
   return ((aData[index] << 8) | aData[index + 1]);
 }
--- a/netwerk/protocol/about/nsAboutCacheEntry.cpp
+++ b/netwerk/protocol/about/nsAboutCacheEntry.cpp
@@ -497,18 +497,17 @@ nsAboutCacheEntry::Channel::OnMetaDataEl
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsIStreamListener implementation
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsAboutCacheEntry::Channel::OnStartRequest(nsIRequest *request,
-                                           nsISupports *ctx) {
+nsAboutCacheEntry::Channel::OnStartRequest(nsIRequest *request) {
   mHexDumpState = 0;
 
   NS_NAMED_LITERAL_CSTRING(buffer, "<hr/>\n<pre>");
   uint32_t n;
   return mOutputStream->Write(buffer.get(), buffer.Length(), &n);
 }
 
 NS_IMETHODIMP
--- a/netwerk/protocol/data/DataChannelParent.cpp
+++ b/netwerk/protocol/data/DataChannelParent.cpp
@@ -72,17 +72,17 @@ NS_IMETHODIMP
 DataChannelParent::Delete() {
   // Nothing to do.
   return NS_OK;
 }
 
 void DataChannelParent::ActorDestroy(ActorDestroyReason why) {}
 
 NS_IMETHODIMP
-DataChannelParent::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) {
+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,
--- a/netwerk/protocol/file/FileChannelParent.cpp
+++ b/netwerk/protocol/file/FileChannelParent.cpp
@@ -72,17 +72,17 @@ NS_IMETHODIMP
 FileChannelParent::Delete() {
   // Nothing to do.
   return NS_OK;
 }
 
 void FileChannelParent::ActorDestroy(ActorDestroyReason why) {}
 
 NS_IMETHODIMP
-FileChannelParent::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) {
+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,
--- a/netwerk/protocol/ftp/FTPChannelChild.cpp
+++ b/netwerk/protocol/ftp/FTPChannelChild.cpp
@@ -311,17 +311,17 @@ void FTPChannelChild::DoOnStartRequest(c
     if (NS_FAILED(rv)) {
       Cancel(rv);
     }
   } else {
     Cancel(rv);
   }
 
   AutoEventEnqueuer ensureSerialDispatch(mEventQ);
-  rv = mListener->OnStartRequest(this, nullptr);
+  rv = mListener->OnStartRequest(this);
   if (NS_FAILED(rv)) Cancel(rv);
 
   if (mDivertingToParent) {
     mListener = nullptr;
     if (mLoadGroup) {
       mLoadGroup->RemoveRequest(this, nullptr, mStatus);
     }
   }
@@ -550,17 +550,17 @@ mozilla::ipc::IPCResult FTPChannelChild:
 void FTPChannelChild::DoFailedAsyncOpen(const nsresult& statusCode) {
   LOG(("FTPChannelChild::DoFailedAsyncOpen [this=%p status=%" PRIx32 "]\n",
        this, static_cast<uint32_t>(statusCode)));
   mStatus = statusCode;
 
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, statusCode);
 
   if (mListener) {
-    mListener->OnStartRequest(this, nullptr);
+    mListener->OnStartRequest(this);
     mIsPending = false;
     mListener->OnStopRequest(this, nullptr, statusCode);
   } else {
     mIsPending = false;
   }
 
   mListener = nullptr;
 
--- a/netwerk/protocol/ftp/FTPChannelParent.cpp
+++ b/netwerk/protocol/ftp/FTPChannelParent.cpp
@@ -375,23 +375,23 @@ void FTPChannelParent::DivertComplete() 
   }
 }
 
 //-----------------------------------------------------------------------------
 // FTPChannelParent::nsIRequestObserver
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-FTPChannelParent::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+FTPChannelParent::OnStartRequest(nsIRequest* aRequest) {
   LOG(("FTPChannelParent::OnStartRequest [this=%p]\n", this));
 
   if (mDivertingFromChild) {
     MOZ_RELEASE_ASSERT(mDivertToListener,
                        "Cannot divert if listener is unset!");
-    return mDivertToListener->OnStartRequest(aRequest, aContext);
+    return mDivertToListener->OnStartRequest(aRequest);
   }
 
   nsCOMPtr<nsIChannel> chan = do_QueryInterface(aRequest);
   MOZ_ASSERT(chan);
   NS_ENSURE_TRUE(chan, NS_ERROR_UNEXPECTED);
 
   // Send down any permissions which are relevant to this URL if we are
   // performing a document load.
@@ -715,17 +715,17 @@ void FTPChannelParent::StartDiversion() 
     if (forcePendingIChan) {
       forcePendingIChan->ForcePending(true);
     }
   }
 
   {
     AutoEventEnqueuer ensureSerialDispatch(mEventQ);
     // Call OnStartRequest for the "DivertTo" listener.
-    nsresult rv = OnStartRequest(mChannel, nullptr);
+    nsresult rv = OnStartRequest(mChannel);
     if (NS_FAILED(rv)) {
       if (mChannel) {
         mChannel->Cancel(rv);
       }
       mStatus = rv;
       return;
     }
   }
@@ -795,17 +795,17 @@ void FTPChannelParent::NotifyDiversionFa
   // Channel has already sent OnStartRequest to the child, so ensure that we
   // call it here if it hasn't already been called.
   if (!mDivertedOnStartRequest) {
     nsCOMPtr<nsIForcePendingChannel> forcePendingIChan =
         do_QueryInterface(mChannel);
     if (forcePendingIChan) {
       forcePendingIChan->ForcePending(true);
     }
-    mDivertToListener->OnStartRequest(mChannel, nullptr);
+    mDivertToListener->OnStartRequest(mChannel);
 
     if (forcePendingIChan) {
       forcePendingIChan->ForcePending(false);
     }
   }
   // If the channel is pending, it will call OnStopRequest itself; otherwise, do
   // it here.
   if (!isPending) {
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
@@ -1791,17 +1791,17 @@ nsFtpState::OnTransportStatus(nsITranspo
   mChannel->OnTransportStatus(nullptr, status, progress,
                               mFileSize - mChannel->StartPos());
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsFtpState::OnStartRequest(nsIRequest *request, nsISupports *context) {
+nsFtpState::OnStartRequest(nsIRequest *request) {
   mStorReplyReceived = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsFtpState::OnStopRequest(nsIRequest *request, nsISupports *context,
                           nsresult status) {
   mUploadRequest = nullptr;
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -763,18 +763,17 @@ void TransactionObserver::Complete(nsHtt
   mAuthOK = !socketControl->GetFailedVerification();
   LOG(("TransactionObserve::Complete %p trans %p authOK %d versionOK %d\n",
        this, aTrans, mAuthOK, mVersionOK));
 }
 
 #define MAX_WK 32768
 
 NS_IMETHODIMP
-TransactionObserver::OnStartRequest(nsIRequest *aRequest,
-                                    nsISupports *aContext) {
+TransactionObserver::OnStartRequest(nsIRequest *aRequest) {
   MOZ_ASSERT(NS_IsMainThread());
   // only consider the first 32KB.. because really.
   mWKResponse.SetCapacity(MAX_WK);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TransactionObserver::OnDataAvailable(nsIRequest *aRequest,
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -1144,19 +1144,18 @@ class InterceptFailedOnStop : public nsI
   nsCOMPtr<nsIStreamListener> mNext;
   HttpBaseChannel* mChannel;
 
  public:
   InterceptFailedOnStop(nsIStreamListener* arg, HttpBaseChannel* chan)
       : mNext(arg), mChannel(chan) {}
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  NS_IMETHOD OnStartRequest(nsIRequest* aRequest,
-                            nsISupports* aContext) override {
-    return mNext->OnStartRequest(aRequest, aContext);
+  NS_IMETHOD OnStartRequest(nsIRequest* aRequest) override {
+    return mNext->OnStartRequest(aRequest);
   }
 
   NS_IMETHOD OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                            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;
@@ -3292,17 +3291,17 @@ void HttpBaseChannel::DoNotifyListener()
   // LOAD_ONLY_IF_MODIFIED) we want to set mAfterOnStartRequestBegun to true
   // before notifying listener.
   if (!mAfterOnStartRequestBegun) {
     mAfterOnStartRequestBegun = true;
   }
 
   if (mListener && !mOnStartRequestCalled) {
     nsCOMPtr<nsIStreamListener> listener = mListener;
-    listener->OnStartRequest(this, nullptr);
+    listener->OnStartRequest(this);
 
     mOnStartRequestCalled = true;
   }
 
   // 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;
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -79,20 +79,19 @@ using namespace mozilla::ipc;
 
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(InterceptStreamListener, nsIStreamListener,
                   nsIRequestObserver, nsIProgressEventSink)
 
 NS_IMETHODIMP
-InterceptStreamListener::OnStartRequest(nsIRequest* aRequest,
-                                        nsISupports* aContext) {
+InterceptStreamListener::OnStartRequest(nsIRequest* aRequest) {
   if (mOwner) {
-    mOwner->DoOnStartRequest(mOwner, mContext);
+    mOwner->DoOnStartRequest(mOwner, nullptr);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 InterceptStreamListener::OnStatus(nsIRequest* aRequest, nsISupports* aContext,
                                   nsresult status, const char16_t* aStatusArg) {
   if (mOwner) {
@@ -603,17 +602,17 @@ class SyntheticDiversionListener final :
 
  public:
   explicit SyntheticDiversionListener(HttpChannelChild* aChannel)
       : mChannel(aChannel) {
     MOZ_ASSERT(mChannel);
   }
 
   NS_IMETHOD
-  OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) override {
+  OnStartRequest(nsIRequest* aRequest) override {
     MOZ_ASSERT_UNREACHABLE(
         "SyntheticDiversionListener should never see OnStartRequest");
     return NS_OK;
   }
 
   NS_IMETHOD
   OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                 nsresult aStatus) override {
@@ -660,17 +659,17 @@ void HttpChannelChild::DoOnStartRequest(
     return;
   }
 
   if (mSynthesizedResponsePump && mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS) {
     mSynthesizedResponsePump->PeekStream(CallTypeSniffers,
                                          static_cast<nsIChannel*>(this));
   }
 
-  nsresult rv = mListener->OnStartRequest(aRequest, aContext);
+  nsresult rv = mListener->OnStartRequest(aRequest);
   if (NS_FAILED(rv)) {
     Cancel(rv);
     return;
   }
   mOnStartRequestCalled = true;
 
   if (mDivertingToParent) {
     mListener = nullptr;
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1306,17 +1306,17 @@ static void GetTimingAttributes(HttpBase
   // to be passed down.
   aChannel->GetProtocolVersion(aTiming.protocolVersion);
 
   aChannel->GetCacheReadStart(&aTiming.cacheReadStart);
   aChannel->GetCacheReadEnd(&aTiming.cacheReadEnd);
 }
 
 NS_IMETHODIMP
-HttpChannelParent::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+HttpChannelParent::OnStartRequest(nsIRequest* aRequest) {
   nsresult rv;
 
   LOG(("HttpChannelParent::OnStartRequest [this=%p, aRequest=%p]\n", this,
        aRequest));
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_RELEASE_ASSERT(!mDivertingFromChild,
                      "Cannot call OnStartRequest if diverting is set!");
 
@@ -2236,17 +2236,17 @@ void HttpChannelParent::StartDiversion()
   if (mChannel) {
     mChannel->ForcePending(true);
   }
 
   {
     AutoEventEnqueuer ensureSerialDispatch(mEventQ);
 
     // Call OnStartRequest for the "DivertTo" listener.
-    nsresult rv = mDivertListener->OnStartRequest(mChannel, nullptr);
+    nsresult rv = mDivertListener->OnStartRequest(mChannel);
     if (NS_FAILED(rv)) {
       if (mChannel) {
         mChannel->Cancel(rv);
       }
       mStatus = rv;
     }
   }
   mDivertedOnStartRequest = true;
@@ -2327,17 +2327,17 @@ void HttpChannelParent::NotifyDiversionF
     nsCOMPtr<nsIChannelWithDivertableParentListener> divertChannel =
         do_QueryInterface(static_cast<nsIChannel*>(mChannel.get()));
     divertChannel->ResumeInternal();
   }
   // Channel has already sent OnStartRequest to the child, so ensure that we
   // call it here if it hasn't already been called.
   if (!mDivertedOnStartRequest) {
     mChannel->ForcePending(true);
-    mParentListener->OnStartRequest(mChannel, nullptr);
+    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);
   }
 
--- a/netwerk/protocol/http/HttpChannelParentListener.cpp
+++ b/netwerk/protocol/http/HttpChannelParentListener.cpp
@@ -66,25 +66,24 @@ NS_INTERFACE_MAP_BEGIN(HttpChannelParent
   NS_INTERFACE_MAP_ENTRY_CONCRETE(HttpChannelParentListener)
 NS_INTERFACE_MAP_END
 
 //-----------------------------------------------------------------------------
 // HttpChannelParentListener::nsIRequestObserver
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-HttpChannelParentListener::OnStartRequest(nsIRequest* aRequest,
-                                          nsISupports* aContext) {
+HttpChannelParentListener::OnStartRequest(nsIRequest* aRequest) {
   MOZ_RELEASE_ASSERT(!mSuspendedForDiversion,
                      "Cannot call OnStartRequest if suspended for diversion!");
 
   if (!mNextListener) return NS_ERROR_UNEXPECTED;
 
   LOG(("HttpChannelParentListener::OnStartRequest [this=%p]\n", this));
-  return mNextListener->OnStartRequest(aRequest, aContext);
+  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!");
--- a/netwerk/protocol/http/InterceptedHttpChannel.cpp
+++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp
@@ -1003,30 +1003,29 @@ InterceptedHttpChannel::OnRedirectVerify
 
   mIsPending = false;
   ReleaseListeners();
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-InterceptedHttpChannel::OnStartRequest(nsIRequest* aRequest,
-                                       nsISupports* aContext) {
+InterceptedHttpChannel::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (!mProgressSink) {
     GetCallback(mProgressSink);
   }
 
   if (mPump && mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS) {
     mPump->PeekStream(CallTypeSniffers, static_cast<nsIChannel*>(this));
   }
 
   if (mListener) {
-    mListener->OnStartRequest(this, nullptr);
+    mListener->OnStartRequest(this);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 InterceptedHttpChannel::OnStopRequest(nsIRequest* aRequest,
                                       nsISupports* aContext, nsresult aStatus) {
   MOZ_ASSERT(NS_IsMainThread());
--- a/netwerk/protocol/http/nsCORSListenerProxy.cpp
+++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp
@@ -412,18 +412,17 @@ nsresult nsCORSListenerProxy::Init(nsICh
   }
 #ifdef DEBUG
   mInited = true;
 #endif
   return rv;
 }
 
 NS_IMETHODIMP
-nsCORSListenerProxy::OnStartRequest(nsIRequest* aRequest,
-                                    nsISupports* aContext) {
+nsCORSListenerProxy::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(mInited, "nsCORSListenerProxy has not been initialized properly");
   nsresult rv = CheckRequestApproved(aRequest);
   mRequestApproved = NS_SUCCEEDED(rv);
   if (!mRequestApproved) {
     nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
     if (channel) {
       nsCOMPtr<nsIURI> uri;
       NS_GetFinalChannelURI(channel, getter_AddRefs(uri));
@@ -449,28 +448,28 @@ nsCORSListenerProxy::OnStartRequest(nsIR
     }
 
     aRequest->Cancel(NS_ERROR_DOM_BAD_URI);
     nsCOMPtr<nsIStreamListener> listener;
     {
       MutexAutoLock lock(mMutex);
       listener = mOuterListener;
     }
-    listener->OnStartRequest(aRequest, aContext);
+    listener->OnStartRequest(aRequest);
 
     // Reason for NS_ERROR_DOM_BAD_URI already logged in CheckRequestApproved()
     return NS_ERROR_DOM_BAD_URI;
   }
 
   nsCOMPtr<nsIStreamListener> listener;
   {
     MutexAutoLock lock(mMutex);
     listener = mOuterListener;
   }
-  return listener->OnStartRequest(aRequest, aContext);
+  return listener->OnStartRequest(aRequest);
 }
 
 namespace {
 class CheckOriginHeader final : public nsIHttpHeaderVisitor {
  public:
   NS_DECL_ISUPPORTS
 
   CheckOriginHeader() : mHeaderCount(0) {}
@@ -1205,18 +1204,17 @@ void nsCORSPreflightListener::AddResultT
 
       newHeader->token = header;
       newHeader->expirationTime = expirationTime;
     }
   }
 }
 
 NS_IMETHODIMP
-nsCORSPreflightListener::OnStartRequest(nsIRequest* aRequest,
-                                        nsISupports* aContext) {
+nsCORSPreflightListener::OnStartRequest(nsIRequest* aRequest) {
 #ifdef DEBUG
   {
     nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
     nsCOMPtr<nsILoadInfo> loadInfo = channel ? channel->LoadInfo() : nullptr;
     MOZ_ASSERT(!loadInfo || !loadInfo->GetServiceWorkerTaintingSynthesized());
   }
 #endif
 
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -1625,17 +1625,17 @@ nsresult nsHttpChannel::CallOnStartReque
     LOG(
         ("  calling mListener->OnStartRequest by ScopeExit [this=%p, "
          "listener=%p]\n",
          this, mListener.get()));
     MOZ_ASSERT(!mOnStartRequestCalled);
 
     if (mListener) {
       nsCOMPtr<nsIStreamListener> deleteProtector(mListener);
-      deleteProtector->OnStartRequest(this, nullptr);
+      deleteProtector->OnStartRequest(this);
     }
 
     mOnStartRequestCalled = true;
   });
 
   nsresult rv = EnsureMIMEOfScript(this, mURI, mResponseHead, mLoadInfo);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -1697,17 +1697,17 @@ nsresult nsHttpChannel::CallOnStartReque
 
   // About to call OnStartRequest, dismiss the guard object.
   onStartGuard.release();
 
   if (mListener) {
     MOZ_ASSERT(!mOnStartRequestCalled,
                "We should not call OsStartRequest twice");
     nsCOMPtr<nsIStreamListener> deleteProtector(mListener);
-    rv = deleteProtector->OnStartRequest(this, nullptr);
+    rv = deleteProtector->OnStartRequest(this);
     mOnStartRequestCalled = true;
     if (NS_FAILED(rv)) return rv;
   } else {
     NS_WARNING("OnStartRequest skipped because of null listener");
     mOnStartRequestCalled = true;
   }
 
   // Install stream converter if required.
@@ -7306,17 +7306,17 @@ nsHttpChannel::HasCrossOriginOpenerPolic
       return NS_OK;
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsHttpChannel::OnStartRequest(nsIRequest *request, nsISupports *ctxt) {
+nsHttpChannel::OnStartRequest(nsIRequest *request) {
   nsresult rv;
 
   MOZ_ASSERT(mRequestObserversCalled);
 
   AUTO_PROFILER_LABEL("nsHttpChannel::OnStartRequest", NETWORK);
 
   if (!(mCanceled || NS_FAILED(mStatus)) &&
       !WRONG_RACING_RESPONSE_SOURCE(request)) {
@@ -7735,17 +7735,17 @@ nsresult nsHttpChannel::ContinueOnStopRe
     MOZ_ASSERT(NS_FAILED(aStatus), "should have a failure code here");
     // NOTE: since we have a failure status, we can ignore the return
     // value from onStartRequest.
     LOG(("  calling mListener->OnStartRequest [this=%p, listener=%p]\n", this,
          mListener.get()));
     if (mListener) {
       MOZ_ASSERT(!mOnStartRequestCalled,
                  "We should not call OnStartRequest twice.");
-      mListener->OnStartRequest(this, nullptr);
+      mListener->OnStartRequest(this);
       mOnStartRequestCalled = true;
     } else {
       NS_WARNING("OnStartRequest skipped because of null listener");
     }
   }
 
   // if this transaction has been replaced, then bail.
   if (mTransactionReplaced) {
--- a/netwerk/protocol/res/ExtensionProtocolHandler.cpp
+++ b/netwerk/protocol/res/ExtensionProtocolHandler.cpp
@@ -231,17 +231,17 @@ Result<Ok, nsresult> ExtensionStreamGett
   return Ok();
 }
 
 static void CancelRequest(nsIStreamListener* aListener, nsIChannel* aChannel,
                           nsresult aResult) {
   MOZ_ASSERT(aListener);
   MOZ_ASSERT(aChannel);
 
-  aListener->OnStartRequest(aChannel, nullptr);
+  aListener->OnStartRequest(aChannel);
   aListener->OnStopRequest(aChannel, nullptr, 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);
--- a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
+++ b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
@@ -612,33 +612,31 @@ nsViewSourceChannel::SetBaseURI(nsIURI *
 
 NS_IMETHODIMP
 nsViewSourceChannel::GetProtocolVersion(nsACString &aProtocolVersion) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 // nsIRequestObserver methods
 NS_IMETHODIMP
-nsViewSourceChannel::OnStartRequest(nsIRequest *aRequest,
-                                    nsISupports *aContext) {
+nsViewSourceChannel::OnStartRequest(nsIRequest *aRequest) {
   NS_ENSURE_TRUE(mListener, NS_ERROR_FAILURE);
   // The channel may have gotten redirected... Time to update our info
   mChannel = do_QueryInterface(aRequest);
   mHttpChannel = do_QueryInterface(aRequest);
   mCachingChannel = do_QueryInterface(aRequest);
   mCacheInfoChannel = do_QueryInterface(mChannel);
   mUploadChannel = do_QueryInterface(aRequest);
 
   nsresult rv = UpdateLoadInfoResultPrincipalURI();
   if (NS_FAILED(rv)) {
     Cancel(rv);
   }
 
-  return mListener->OnStartRequest(static_cast<nsIViewSourceChannel *>(this),
-                                   aContext);
+  return mListener->OnStartRequest(static_cast<nsIViewSourceChannel *>(this));
 }
 
 NS_IMETHODIMP
 nsViewSourceChannel::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
                                    nsresult aStatus) {
   NS_ENSURE_TRUE(mListener, NS_ERROR_FAILURE);
   if (mChannel) {
     nsCOMPtr<nsILoadGroup> loadGroup;
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
@@ -3657,17 +3657,17 @@ WebSocketChannel::OnTransportAvailable(n
   }
 
   return NS_OK;
 }
 
 // nsIRequestObserver (from nsIStreamListener)
 
 NS_IMETHODIMP
-WebSocketChannel::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) {
+WebSocketChannel::OnStartRequest(nsIRequest *aRequest) {
   LOG(("WebSocketChannel::OnStartRequest(): %p [%p %p] recvdhttpupgrade=%d\n",
        this, aRequest, mHttpChannel.get(), mRecvdHttpUpgradeTransport));
   MOZ_ASSERT(NS_IsMainThread(), "not main thread");
   MOZ_ASSERT(!mGotUpgradeOK, "OTA duplicated");
 
   if (mStopped) {
     LOG(("WebSocketChannel::OnStartRequest: Channel Already Done\n"));
     AbortSession(NS_ERROR_CONNECTION_REFUSED);
--- a/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
+++ b/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
@@ -180,17 +180,17 @@ void WyciwygChannelChild::OnStartRequest
   if (!securityInfo.IsEmpty()) {
     rv = NS_DeserializeObject(securityInfo, getter_AddRefs(mSecurityInfo));
     MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv),
                           "Deserializing security info should not fail");
   }
 
   AutoEventEnqueuer ensureSerialDispatch(mEventQ);
 
-  rv = mListener->OnStartRequest(this, nullptr);
+  rv = mListener->OnStartRequest(this);
   if (NS_FAILED(rv)) Cancel(rv);
 }
 
 class WyciwygDataAvailableEvent
     : public NeckoTargetChannelEvent<WyciwygChannelChild> {
  public:
   WyciwygDataAvailableEvent(WyciwygChannelChild* child, const nsCString& data,
                             const uint64_t& offset)
@@ -315,17 +315,17 @@ void WyciwygChannelChild::CancelEarly(co
 
   mCanceled = true;
   mStatus = statusCode;
 
   mIsPending = false;
   if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, mStatus);
 
   if (mListener) {
-    mListener->OnStartRequest(this, nullptr);
+    mListener->OnStartRequest(this);
     mListener->OnStopRequest(this, nullptr, mStatus);
   }
   mListener = nullptr;
 
   if (mIPCOpen) PWyciwygChannelChild::Send__delete__(this);
 }
 
 //-----------------------------------------------------------------------------
--- a/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
+++ b/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
@@ -274,18 +274,17 @@ mozilla::ipc::IPCResult WyciwygChannelPa
   return IPC_OK();
 }
 
 //-----------------------------------------------------------------------------
 // WyciwygChannelParent::nsIRequestObserver
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-WyciwygChannelParent::OnStartRequest(nsIRequest* aRequest,
-                                     nsISupports* aContext) {
+WyciwygChannelParent::OnStartRequest(nsIRequest* aRequest) {
   LOG(("WyciwygChannelParent::OnStartRequest [this=%p]\n", this));
 
   nsresult rv;
 
   nsCOMPtr<nsIWyciwygChannel> chan = do_QueryInterface(aRequest, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Send down any permissions which are relevant to this URL if we are
--- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
+++ b/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
@@ -571,24 +571,24 @@ nsWyciwygChannel::OnDataAvailable(nsIReq
   return rv;  // let the pump cancel on failure
 }
 
 //////////////////////////////////////////////////////////////////////////////
 // nsIRequestObserver
 //////////////////////////////////////////////////////////////////////////////
 
 NS_IMETHODIMP
-nsWyciwygChannel::OnStartRequest(nsIRequest *request, nsISupports *ctx) {
+nsWyciwygChannel::OnStartRequest(nsIRequest *request) {
   LOG(("nsWyciwygChannel::OnStartRequest [this=%p request=%p]\n", this,
        request));
 
   nsCOMPtr<nsIStreamListener> listener = mListener;
 
   if (listener) {
-    return listener->OnStartRequest(this, nullptr);
+    return listener->OnStartRequest(this);
   }
 
   MOZ_ASSERT(false, "We must have a listener!");
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP
 nsWyciwygChannel::OnStopRequest(nsIRequest *request, nsISupports *ctx,
@@ -709,17 +709,17 @@ void nsWyciwygChannel::WriteCharsetAndSo
 }
 
 void nsWyciwygChannel::NotifyListener() {
   nsCOMPtr<nsIStreamListener> listener;
 
   listener.swap(mListener);
 
   if (listener) {
-    listener->OnStartRequest(this, nullptr);
+    listener->OnStartRequest(this);
     mIsPending = false;
     listener->OnStopRequest(this, nullptr, mStatus);
   } else {
     MOZ_ASSERT(false, "We must have the listener!");
     mIsPending = false;
   }
 
   CloseCacheEntry(mStatus);
--- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
@@ -1220,17 +1220,17 @@ mozTXTToHTMLConv::AsyncConvertData(const
 NS_IMETHODIMP
 mozTXTToHTMLConv::OnDataAvailable(nsIRequest* request, nsISupports* ctxt,
                                   nsIInputStream* inStr, uint64_t sourceOffset,
                                   uint32_t count) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-mozTXTToHTMLConv::OnStartRequest(nsIRequest* request, nsISupports* ctxt) {
+mozTXTToHTMLConv::OnStartRequest(nsIRequest* request) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 mozTXTToHTMLConv::OnStopRequest(nsIRequest* request, nsISupports* ctxt,
                                 nsresult aStatus) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
--- a/netwerk/streamconv/converters/nsDirIndexParser.cpp
+++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp
@@ -82,17 +82,17 @@ nsDirIndexParser::GetEncoding(char **aEn
   *aEncoding = ToNewCString(mEncoding);
 
   if (!*aEncoding) return NS_ERROR_OUT_OF_MEMORY;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDirIndexParser::OnStartRequest(nsIRequest *aRequest, nsISupports *aCtxt) {
+nsDirIndexParser::OnStartRequest(nsIRequest *aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDirIndexParser::OnStopRequest(nsIRequest *aRequest, nsISupports *aCtxt,
                                 nsresult aStatusCode) {
   // Finish up
   if (mBuf.Length() > (uint32_t)mLineStart) {
--- a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp
+++ b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp
@@ -156,20 +156,20 @@ nsFTPDirListingConv::OnDataAvailable(nsI
   rv = mFinalListener->OnDataAvailable(request, ctxt, inputData, 0,
                                        indexFormat.Length());
 
   return rv;
 }
 
 // nsIRequestObserver implementation
 NS_IMETHODIMP
-nsFTPDirListingConv::OnStartRequest(nsIRequest *request, nsISupports *ctxt) {
+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, ctxt);
+  return mFinalListener->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
 nsFTPDirListingConv::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
                                    nsresult aStatus) {
   // we don't care about stop. move along...
 
   return mFinalListener->OnStopRequest(request, ctxt, aStatus);
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
@@ -111,24 +111,24 @@ nsHTTPCompressConv::AsyncConvertData(con
   MutexAutoLock lock(mMutex);
   // hook ourself up with the receiving listener.
   mListener = aListener;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsHTTPCompressConv::OnStartRequest(nsIRequest *request, nsISupports *aContext) {
+nsHTTPCompressConv::OnStartRequest(nsIRequest *request) {
   LOG(("nsHttpCompresssConv %p onstart\n", this));
   nsCOMPtr<nsIStreamListener> listener;
   {
     MutexAutoLock lock(mMutex);
     listener = mListener;
   }
-  return listener->OnStartRequest(request, aContext);
+  return listener->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
 nsHTTPCompressConv::OnStopRequest(nsIRequest *request, nsISupports *aContext,
                                   nsresult aStatus) {
   nsresult status = aStatus;
   LOG(("nsHttpCompresssConv %p onstop %" PRIx32 "\n", this,
        static_cast<uint32_t>(aStatus)));
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -90,34 +90,34 @@ nsIndexedToHTML::Convert(nsIInputStream*
 NS_IMETHODIMP
 nsIndexedToHTML::AsyncConvertData(const char* aFromType, const char* aToType,
                                   nsIStreamListener* aListener,
                                   nsISupports* aCtxt) {
   return Init(aListener);
 }
 
 NS_IMETHODIMP
-nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports* aContext) {
+nsIndexedToHTML::OnStartRequest(nsIRequest* request) {
   nsCString buffer;
-  nsresult rv = DoOnStartRequest(request, aContext, buffer);
+  nsresult rv = DoOnStartRequest(request, nullptr, buffer);
   if (NS_FAILED(rv)) {
     request->Cancel(rv);
   }
 
-  rv = mListener->OnStartRequest(request, aContext);
+  rv = mListener->OnStartRequest(request);
   if (NS_FAILED(rv)) return rv;
 
   // The request may have been canceled, and if that happens, we want to
   // suppress calls to OnDataAvailable.
   request->GetStatus(&rv);
   if (NS_FAILED(rv)) return rv;
 
   // Push our buffer to the listener.
 
-  rv = SendToListener(request, aContext, buffer);
+  rv = SendToListener(request, nullptr, buffer);
   return rv;
 }
 
 nsresult nsIndexedToHTML::DoOnStartRequest(nsIRequest* request,
                                            nsISupports* aContext,
                                            nsCString& aBuffer) {
   nsresult rv;
 
@@ -140,17 +140,17 @@ nsresult nsIndexedToHTML::DoOnStartReque
   channel->SetContentType(NS_LITERAL_CSTRING("text/html"));
 
   mParser = nsDirIndexParser::CreateInstance();
   if (!mParser) return NS_ERROR_FAILURE;
 
   rv = mParser->SetListener(this);
   if (NS_FAILED(rv)) return rv;
 
-  rv = mParser->OnStartRequest(request, aContext);
+  rv = mParser->OnStartRequest(request);
   if (NS_FAILED(rv)) return rv;
 
   nsAutoCString baseUri, titleUri;
   rv = uri->GetAsciiSpec(baseUri);
   if (NS_FAILED(rv)) return rv;
 
   nsCOMPtr<nsIURI> titleURL;
   rv = NS_MutateURI(uri)
--- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp
+++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp
@@ -44,17 +44,17 @@ nsPartChannel::nsPartChannel(nsIChannel 
 void nsPartChannel::InitializeByteRange(int64_t aStart, int64_t aEnd) {
   mIsByteRangeRequest = true;
 
   mByteRangeStart = aStart;
   mByteRangeEnd = aEnd;
 }
 
 nsresult nsPartChannel::SendOnStartRequest(nsISupports *aContext) {
-  return mListener->OnStartRequest(this, aContext);
+  return mListener->OnStartRequest(this);
 }
 
 nsresult nsPartChannel::SendOnDataAvailable(nsISupports *aContext,
                                             nsIInputStream *aStream,
                                             uint64_t aOffset, uint32_t aLen) {
   return mListener->OnDataAvailable(this, aContext, aStream, aOffset, aLen);
 }
 
@@ -403,23 +403,22 @@ nsMultiMixedConv::AsyncConvertData(const
   // of these for each sub-part in the raw stream.
   mFinalListener = aListener;
 
   return NS_OK;
 }
 
 // nsIRequestObserver implementation
 NS_IMETHODIMP
-nsMultiMixedConv::OnStartRequest(nsIRequest *request, nsISupports *ctxt) {
+nsMultiMixedConv::OnStartRequest(nsIRequest *request) {
   // we're assuming the content-type is available at this stage
   NS_ASSERTION(mBoundary.IsEmpty(), "a second on start???");
 
   nsresult rv;
 
-  mContext = ctxt;
   mTotalSent = 0;
   mChannel = do_QueryInterface(request, &rv);
   if (NS_FAILED(rv)) return rv;
 
   nsAutoCString contentType;
 
   // ask the HTTP channel for the content-type and extract the boundary from it.
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel, &rv);
@@ -548,17 +547,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, ctxt);
+    (void)mFinalListener->OnStartRequest(request);
     (void)mFinalListener->OnStopRequest(request, ctxt, aStatus);
   }
 
   return NS_OK;
 }
 
 nsresult nsMultiMixedConv::ConsumeToken(Token const &token) {
   nsresult rv;
--- a/netwerk/streamconv/converters/nsUnknownDecoder.cpp
+++ b/netwerk/streamconv/converters/nsUnknownDecoder.cpp
@@ -43,17 +43,17 @@ nsresult nsUnknownDecoder::ConvertedStre
   nsCString* decodedData = static_cast<nsCString*>(closure);
   decodedData->Append(rawSegment, count);
   *writeCount = count;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsUnknownDecoder::ConvertedStreamListener::OnStartRequest(
-    nsIRequest* request, nsISupports* context) {
+    nsIRequest* request) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsUnknownDecoder::ConvertedStreamListener::OnDataAvailable(
     nsIRequest* request, nsISupports* context, nsIInputStream* stream,
     uint64_t offset, uint32_t count) {
   uint32_t read;
@@ -237,17 +237,17 @@ nsUnknownDecoder::OnDataAvailable(nsIReq
 
 // ----
 //
 // nsIRequestObserver methods...
 //
 // ----
 
 NS_IMETHODIMP
-nsUnknownDecoder::OnStartRequest(nsIRequest* request, nsISupports* aCtxt) {
+nsUnknownDecoder::OnStartRequest(nsIRequest* request) {
   nsresult rv = NS_OK;
 
   {
     MutexAutoLock lock(mMutex);
     if (!mNextListener) return NS_ERROR_FAILURE;
   }
 
   // Allocate the sniffer buffer...
@@ -684,29 +684,29 @@ nsresult nsUnknownDecoder::FireListenerN
     }
 
     NS_ASSERTION(NS_SUCCEEDED(rv), "Unable to set content type on channel!");
 
     if (NS_FAILED(rv)) {
       // Cancel the request to make sure it has the correct status if
       // mNextListener looks at it.
       request->Cancel(rv);
-      listener->OnStartRequest(request, aCtxt);
+      listener->OnStartRequest(request);
 
       nsCOMPtr<nsIDivertableChannel> divertable = do_QueryInterface(request);
       if (divertable) {
         rv = divertable->UnknownDecoderInvolvedOnStartRequestCalled();
       }
 
       return rv;
     }
   }
 
   // Fire the OnStartRequest(...)
-  rv = listener->OnStartRequest(request, aCtxt);
+  rv = listener->OnStartRequest(request);
 
   nsCOMPtr<nsIDivertableChannel> divertable = do_QueryInterface(request);
   if (divertable) {
     rv = divertable->UnknownDecoderInvolvedOnStartRequestCalled();
     bool diverting;
     divertable->GetDivertingToParent(&diverting);
     if (diverting) {
       // The channel is diverted to the parent do not send any more data here.
@@ -784,17 +784,17 @@ nsresult nsUnknownDecoder::ConvertEncode
     rv = encodedChannel->DoApplyContentConversions(
         strListener, getter_AddRefs(listener), nullptr);
 
     if (NS_FAILED(rv)) {
       return rv;
     }
 
     if (listener) {
-      listener->OnStartRequest(request, nullptr);
+      listener->OnStartRequest(request);
 
       if (length) {
         nsCOMPtr<nsIStringInputStream> rawStream =
             do_CreateInstance(NS_STRINGINPUTSTREAM_CONTRACTID);
         if (!rawStream) return NS_ERROR_FAILURE;
 
         rv = rawStream->SetData((const char*)data, length);
         NS_ENSURE_SUCCESS(rv, rv);
--- a/parser/html/nsHtml5StreamListener.cpp
+++ b/parser/html/nsHtml5StreamListener.cpp
@@ -29,22 +29,21 @@ NS_IMETHODIMP
 nsHtml5StreamListener::CheckListenerChain() {
   if (MOZ_UNLIKELY(!mDelegate)) {
     return NS_ERROR_NOT_AVAILABLE;
   }
   return mDelegate->CheckListenerChain();
 }
 
 NS_IMETHODIMP
-nsHtml5StreamListener::OnStartRequest(nsIRequest* aRequest,
-                                      nsISupports* aContext) {
+nsHtml5StreamListener::OnStartRequest(nsIRequest* aRequest) {
   if (MOZ_UNLIKELY(!mDelegate)) {
     return NS_ERROR_NOT_AVAILABLE;
   }
-  return mDelegate->OnStartRequest(aRequest, aContext);
+  return mDelegate->OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 nsHtml5StreamListener::OnStopRequest(nsIRequest* aRequest,
                                      nsISupports* aContext, nsresult aStatus) {
   if (MOZ_UNLIKELY(!mDelegate)) {
     return NS_ERROR_NOT_AVAILABLE;
   }
--- a/parser/html/nsHtml5StreamParser.cpp
+++ b/parser/html/nsHtml5StreamParser.cpp
@@ -881,26 +881,25 @@ class MaybeRunCollector : public Runnabl
     nsJSContext::MaybeRunNextCollectorSlice(mDocShell,
                                             JS::GCReason::HTML_PARSER);
     return NS_OK;
   }
 
   nsCOMPtr<nsIDocShell> mDocShell;
 };
 
-nsresult nsHtml5StreamParser::OnStartRequest(nsIRequest* aRequest,
-                                             nsISupports* aContext) {
+nsresult nsHtml5StreamParser::OnStartRequest(nsIRequest* aRequest) {
   MOZ_RELEASE_ASSERT(STREAM_NOT_STARTED == mStreamState,
                      "Got OnStartRequest when the stream had already started.");
   MOZ_ASSERT(
       !mExecutor->HasStarted(),
       "Got OnStartRequest at the wrong stage in the executor life cycle.");
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   if (mObserver) {
-    mObserver->OnStartRequest(aRequest, aContext);
+    mObserver->OnStartRequest(aRequest);
   }
   mRequest = aRequest;
 
   mStreamState = STREAM_BEING_READ;
 
   if (mMode == VIEW_SOURCE_HTML || mMode == VIEW_SOURCE_XML) {
     mTokenizer->StartViewSource(NS_ConvertUTF8toUTF16(mViewSourceTitle));
   }
--- a/parser/html/nsHtml5StreamParser.h
+++ b/parser/html/nsHtml5StreamParser.h
@@ -121,17 +121,17 @@ class nsHtml5StreamParser final : public
                                            nsICharsetDetectionObserver)
 
   nsHtml5StreamParser(nsHtml5TreeOpExecutor* aExecutor, nsHtml5Parser* aOwner,
                       eParserMode aMode);
 
   // Methods that nsHtml5StreamListener calls
   nsresult CheckListenerChain();
 
-  nsresult OnStartRequest(nsIRequest* aRequest, nsISupports* aContext);
+  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 status);
 
--- a/parser/htmlparser/nsParser.cpp
+++ b/parser/htmlparser/nsParser.cpp
@@ -1064,23 +1064,23 @@ nsresult nsParser::BuildModel() {
   }
   return result;
 }
 
 /*******************************************************************
   These methods are used to talk to the netlib system...
  *******************************************************************/
 
-nsresult nsParser::OnStartRequest(nsIRequest* request, nsISupports* aContext) {
+nsresult nsParser::OnStartRequest(nsIRequest* request) {
   MOZ_ASSERT(eNone == mParserContext->mStreamListenerState,
              "Parser's nsIStreamListener API was not setup "
              "correctly in constructor.");
 
   if (mObserver) {
-    mObserver->OnStartRequest(request, aContext);
+    mObserver->OnStartRequest(request);
   }
   mParserContext->mStreamListenerState = eOnStart;
   mParserContext->mAutoDetectStatus = eUnknownDetect;
   mParserContext->mRequest = request;
 
   NS_ASSERTION(!mParserContext->mPrevContext,
                "Clobbering DTD for non-root parser context!");
   mDTD = nullptr;
--- a/security/manager/ssl/ContentSignatureVerifier.cpp
+++ b/security/manager/ssl/ContentSignatureVerifier.cpp
@@ -515,18 +515,17 @@ nsresult ContentSignatureVerifier::Parse
   mSignature.ReplaceChar('_', '/');
 
   return NS_OK;
 }
 
 /* nsIStreamListener implementation */
 
 NS_IMETHODIMP
-ContentSignatureVerifier::OnStartRequest(nsIRequest* aRequest,
-                                         nsISupports* aContext) {
+ContentSignatureVerifier::OnStartRequest(nsIRequest* aRequest) {
   MOZ_ASSERT(NS_IsMainThread());
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ContentSignatureVerifier::OnStopRequest(nsIRequest* aRequest,
                                         nsISupports* aContext,
                                         nsresult aStatus) {
--- a/security/manager/ssl/PSMContentListener.cpp
+++ b/security/manager/ssl/PSMContentListener.cpp
@@ -99,18 +99,17 @@ PSMContentStreamListener::PSMContentStre
     : mType(type) {}
 
 PSMContentStreamListener::~PSMContentStreamListener() {}
 
 NS_IMPL_ISUPPORTS(PSMContentStreamListener, nsIStreamListener,
                   nsIRequestObserver)
 
 NS_IMETHODIMP
-PSMContentStreamListener::OnStartRequest(nsIRequest* request,
-                                         nsISupports* context) {
+PSMContentStreamListener::OnStartRequest(nsIRequest* request) {
   MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("CertDownloader::OnStartRequest\n"));
 
   int64_t contentLength = ComputeContentLength(request);
   if (contentLength < 0) {
     return NS_ERROR_FAILURE;
   }
 
   mByteData.SetCapacity(contentLength);
@@ -262,18 +261,17 @@ void PSMContentDownloaderParent::ActorDe
 
 NS_IMPL_ISUPPORTS(PSMContentDownloaderChild, nsIStreamListener)
 
 PSMContentDownloaderChild::PSMContentDownloaderChild() {}
 
 PSMContentDownloaderChild::~PSMContentDownloaderChild() {}
 
 NS_IMETHODIMP
-PSMContentDownloaderChild::OnStartRequest(nsIRequest* request,
-                                          nsISupports* context) {
+PSMContentDownloaderChild::OnStartRequest(nsIRequest* request) {
   nsCOMPtr<nsIDivertableChannel> divertable = do_QueryInterface(request);
   if (divertable) {
     mozilla::net::ChannelDiverterChild* diverter = nullptr;
     nsresult rv = divertable->DivertToParent(&diverter);
     if (NS_FAILED(rv)) {
       return rv;
     }
     MOZ_ASSERT(diverter);
--- a/toolkit/components/extensions/webrequest/ChannelWrapper.cpp
+++ b/toolkit/components/extensions/webrequest/ChannelWrapper.cpp
@@ -917,26 +917,25 @@ ChannelWrapper::RequestListener::~Reques
 nsresult ChannelWrapper::RequestListener::Init() {
   if (nsCOMPtr<nsITraceableChannel> chan = mChannelWrapper->QueryChannel()) {
     return chan->SetNewListener(this, getter_AddRefs(mOrigStreamListener));
   }
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP
-ChannelWrapper::RequestListener::OnStartRequest(nsIRequest* request,
-                                                nsISupports* aCtxt) {
+ChannelWrapper::RequestListener::OnStartRequest(nsIRequest* request) {
   MOZ_ASSERT(mOrigStreamListener, "Should have mOrigStreamListener");
 
   mChannelWrapper->mChannelEntry = nullptr;
   mChannelWrapper->mResponseStarted = true;
   mChannelWrapper->ErrorCheck();
   mChannelWrapper->FireEvent(NS_LITERAL_STRING("start"));
 
-  return mOrigStreamListener->OnStartRequest(request, aCtxt);
+  return mOrigStreamListener->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
 ChannelWrapper::RequestListener::OnStopRequest(nsIRequest* request,
                                                nsISupports* aCtxt,
                                                nsresult aStatus) {
   MOZ_ASSERT(mOrigStreamListener, "Should have mOrigStreamListener");
 
--- a/toolkit/components/extensions/webrequest/StreamFilterParent.cpp
+++ b/toolkit/components/extensions/webrequest/StreamFilterParent.cpp
@@ -444,22 +444,19 @@ StreamFilterParent::SetLoadFlags(nsLoadF
   return mChannel->SetLoadFlags(aLoadFlags);
 }
 
 /*****************************************************************************
  * nsIStreamListener
  *****************************************************************************/
 
 NS_IMETHODIMP
-StreamFilterParent::OnStartRequest(nsIRequest* aRequest,
-                                   nsISupports* aContext) {
+StreamFilterParent::OnStartRequest(nsIRequest* aRequest) {
   AssertIsMainThread();
 
-  mContext = aContext;
-
   if (aRequest != mChannel) {
     mDisconnected = true;
 
     RefPtr<StreamFilterParent> self(this);
     RunOnActorThread(FUNC, [=] {
       if (self->IPCActive()) {
         self->mState = State::Disconnected;
         CheckResult(self->SendError(NS_LITERAL_CSTRING("Channel redirected")));
@@ -469,17 +466,17 @@ StreamFilterParent::OnStartRequest(nsIRe
 
   if (!mDisconnected) {
     Unused << mChannel->GetLoadGroup(getter_AddRefs(mLoadGroup));
     if (mLoadGroup) {
       Unused << mLoadGroup->AddRequest(this, nullptr);
     }
   }
 
-  nsresult rv = mOrigListener->OnStartRequest(aRequest, aContext);
+  nsresult rv = mOrigListener->OnStartRequest(aRequest);
 
   // Important: Do this only *after* running the next listener in the chain, so
   // that we get the final delivery target after any retargeting that it may do.
   if (nsCOMPtr<nsIThreadRetargetableRequest> req =
           do_QueryInterface(aRequest)) {
     nsCOMPtr<nsIEventTarget> thread;
     Unused << req->GetDeliveryTarget(getter_AddRefs(thread));
     if (thread) {
--- a/toolkit/components/places/FaviconHelpers.cpp
+++ b/toolkit/components/places/FaviconHelpers.cpp
@@ -621,18 +621,17 @@ AsyncFetchAndSetIconForPage::Cancel() {
   mCanceled = true;
   if (mRequest) {
     mRequest->Cancel(NS_BINDING_ABORTED);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-AsyncFetchAndSetIconForPage::OnStartRequest(nsIRequest* aRequest,
-                                            nsISupports* aContext) {
+AsyncFetchAndSetIconForPage::OnStartRequest(nsIRequest* aRequest) {
   // mRequest should already be set from ::FetchFromNetwork, but in the case of
   // a redirect we might get a new request, and we should make sure we keep a
   // reference to the most current request.
   mRequest = aRequest;
   if (mCanceled) {
     mRequest->Cancel(NS_BINDING_ABORTED);
   }
   return NS_OK;
--- a/toolkit/components/places/nsAnnoProtocolHandler.cpp
+++ b/toolkit/components/places/nsAnnoProtocolHandler.cpp
@@ -152,17 +152,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, nullptr);
+      mListener->OnStartRequest(mChannel);
       mListener->OnStopRequest(mChannel, nullptr, rv);
       return rv;
     }
     return newChannel->AsyncOpen(mListener);
   }
 
  protected:
   virtual ~faviconAsyncLoader() {}
--- a/toolkit/components/reputationservice/ApplicationReputation.cpp
+++ b/toolkit/components/reputationservice/ApplicationReputation.cpp
@@ -1667,17 +1667,17 @@ NS_IMETHODIMP
 PendingLookup::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
                                nsIInputStream* aStream, uint64_t offset,
                                uint32_t count) {
   uint32_t read;
   return aStream->ReadSegments(AppendSegmentToString, &mResponse, count, &read);
 }
 
 NS_IMETHODIMP
-PendingLookup::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
+PendingLookup::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PendingLookup::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
                              nsresult aResult) {
   NS_ENSURE_STATE(mCallback);
 
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -1824,18 +1824,17 @@ class ThreatHitReportListener final : pu
  private:
   ~ThreatHitReportListener() = default;
 };
 
 NS_IMPL_ISUPPORTS(ThreatHitReportListener, nsIStreamListener,
                   nsIRequestObserver)
 
 NS_IMETHODIMP
-ThreatHitReportListener::OnStartRequest(nsIRequest* aRequest,
-                                        nsISupports* aContext) {
+ThreatHitReportListener::OnStartRequest(nsIRequest* aRequest) {
   if (!LOG_ENABLED()) {
     return NS_OK;  // Nothing to do!
   }
 
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest);
   NS_ENSURE_TRUE(httpChannel, NS_OK);
 
   nsresult rv, status;
--- a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
@@ -563,18 +563,17 @@ nsresult nsUrlClassifierStreamUpdater::A
 
   return NS_OK;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 // nsIStreamListenerObserver implementation
 
 NS_IMETHODIMP
-nsUrlClassifierStreamUpdater::OnStartRequest(nsIRequest *request,
-                                             nsISupports *context) {
+nsUrlClassifierStreamUpdater::OnStartRequest(nsIRequest *request) {
   nsresult rv;
   bool downloadError = false;
   nsAutoCString strStatus;
   nsresult status = NS_OK;
 
   // Only update if we got http success header
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(request);
   if (httpChannel) {
--- a/uriloader/base/nsDocLoader.cpp
+++ b/uriloader/base/nsDocLoader.cpp
@@ -347,17 +347,17 @@ void nsDocLoader::DestroyChildren() {
           static_cast<nsDocLoader*>(loader)->SetDocLoaderParent(nullptr);
       NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "SetDocLoaderParent failed");
     }
   }
   mChildList.Clear();
 }
 
 NS_IMETHODIMP
-nsDocLoader::OnStartRequest(nsIRequest* request, nsISupports* aCtxt) {
+nsDocLoader::OnStartRequest(nsIRequest* request) {
   // called each time a request is added to the group.
 
   if (MOZ_LOG_TEST(gDocLoaderLog, LogLevel::Debug)) {
     nsAutoCString name;
     request->GetName(name);
 
     uint32_t count = 0;
     if (mLoadGroup) mLoadGroup->GetActiveCount(&count);
--- a/uriloader/base/nsURILoader.cpp
+++ b/uriloader/base/nsURILoader.cpp
@@ -193,18 +193,17 @@ nsresult nsDocumentOpenInfo::Prepare() {
 
   nsresult rv;
 
   // ask our window context if it has a uri content listener...
   m_contentListener = do_GetInterface(m_originalContext, &rv);
   return rv;
 }
 
-NS_IMETHODIMP nsDocumentOpenInfo::OnStartRequest(nsIRequest* request,
-                                                 nsISupports* aCtxt) {
+NS_IMETHODIMP nsDocumentOpenInfo::OnStartRequest(nsIRequest* request) {
   LOG(("[0x%p] nsDocumentOpenInfo::OnStartRequest", this));
   MOZ_ASSERT(request);
   if (!request) {
     return NS_ERROR_UNEXPECTED;
   }
 
   nsresult rv = NS_OK;
 
@@ -292,29 +291,29 @@ NS_IMETHODIMP nsDocumentOpenInfo::OnStar
 
     //
     // The transaction has already reported an error - so it will be torn
     // down. Therefore, it is not necessary to return an error code...
     //
     return NS_OK;
   }
 
-  rv = DispatchContent(request, aCtxt);
+  rv = DispatchContent(request, nullptr);
 
   LOG(("  After dispatch, m_targetStreamListener: 0x%p, rv: 0x%08" PRIX32,
        m_targetStreamListener.get(), static_cast<uint32_t>(rv)));
 
   NS_ASSERTION(
       NS_SUCCEEDED(rv) || !m_targetStreamListener,
       "Must not have an m_targetStreamListener with a failure return!");
 
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (m_targetStreamListener)
-    rv = m_targetStreamListener->OnStartRequest(request, aCtxt);
+    rv = m_targetStreamListener->OnStartRequest(request);
 
   LOG(("  OnStartRequest returning: 0x%08" PRIX32, static_cast<uint32_t>(rv)));
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsDocumentOpenInfo::CheckListenerChain() {
--- a/uriloader/exthandler/ExternalHelperAppChild.cpp
+++ b/uriloader/exthandler/ExternalHelperAppChild.cpp
@@ -55,18 +55,18 @@ ExternalHelperAppChild::OnDataAvailable(
   return NS_OK;
 }
 
 //////////////////////////////////////////////////////////////////////////////
 // nsIRequestObserver
 //////////////////////////////////////////////////////////////////////////////
 
 NS_IMETHODIMP
-ExternalHelperAppChild::OnStartRequest(nsIRequest *request, nsISupports *ctx) {
-  nsresult rv = mHandler->OnStartRequest(request, ctx);
+ExternalHelperAppChild::OnStartRequest(nsIRequest *request) {
+  nsresult rv = mHandler->OnStartRequest(request);
   NS_ENSURE_SUCCESS(rv, NS_ERROR_UNEXPECTED);
 
   // Calling OnStartRequest could cause mHandler to close the window it was
   // loaded for. In that case, the TabParent in the parent context might then
   // point to the wrong window. Re-send the window context along with either
   // DivertToParent or SendOnStartRequest just in case.
   nsCOMPtr<nsPIDOMWindowOuter> window =
       do_GetInterface(mHandler->GetDialogParent());
--- a/uriloader/exthandler/ExternalHelperAppParent.cpp
+++ b/uriloader/exthandler/ExternalHelperAppParent.cpp
@@ -133,17 +133,17 @@ mozilla::ipc::IPCResult ExternalHelperAp
     const nsCString& entityID, PBrowserParent* contentContext) {
   MOZ_ASSERT(!mDiverted,
              "child forwarding callbacks after request was diverted");
 
   UpdateContentContext(mListener, contentContext);
 
   mEntityID = entityID;
   mPending = true;
-  mStatus = mListener->OnStartRequest(this, nullptr);
+  mStatus = mListener->OnStartRequest(this);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult ExternalHelperAppParent::RecvOnDataAvailable(
     const nsCString& data, const uint64_t& offset, const uint32_t& count) {
   if (NS_FAILED(mStatus)) return IPC_OK();
 
   MOZ_ASSERT(!mDiverted,
@@ -195,19 +195,19 @@ NS_IMETHODIMP
 ExternalHelperAppParent::OnDataAvailable(nsIRequest* request, nsISupports* ctx,
                                          nsIInputStream* input, uint64_t offset,
                                          uint32_t count) {
   MOZ_ASSERT(mDiverted);
   return mListener->OnDataAvailable(request, ctx, input, offset, count);
 }
 
 NS_IMETHODIMP
-ExternalHelperAppParent::OnStartRequest(nsIRequest* request, nsISupports* ctx) {
+ExternalHelperAppParent::OnStartRequest(nsIRequest* request) {
   MOZ_ASSERT(mDiverted);
-  return mListener->OnStartRequest(request, ctx);
+  return mListener->OnStartRequest(request);
 }
 
 NS_IMETHODIMP
 ExternalHelperAppParent::OnStopRequest(nsIRequest* request, nsISupports* ctx,
                                        nsresult status) {
   MOZ_ASSERT(mDiverted);
   nsresult rv = mListener->OnStopRequest(request, ctx, status);
   Delete();
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -1497,18 +1497,17 @@ void nsExternalAppHandler::MaybeApplyDec
         }
       }
     }
   }
 
   encChannel->SetApplyConversion(applyConversion);
 }
 
-NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request,
-                                                   nsISupports* aCtxt) {
+NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
   MOZ_ASSERT(request, "OnStartRequest without request?");
 
   // Set mTimeDownloadStarted here as the download has already started and
   // we want to record the start time before showing the filepicker.
   mTimeDownloadStarted = PR_Now();
 
   mRequest = request;
 
--- a/uriloader/exthandler/nsExternalProtocolHandler.cpp
+++ b/uriloader/exthandler/nsExternalProtocolHandler.cpp
@@ -172,17 +172,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, nullptr);
+            listener->OnStartRequest(self);
             listener->OnStopRequest(self, nullptr, self->mStatus);
           }));
     }
   }
 
 finish:
   mCallbacks = nullptr;
   mListener = nullptr;
@@ -416,18 +416,17 @@ NS_IMETHODIMP nsExtProtocolChannel::Noti
   return NS_OK;
 }
 
 NS_IMETHODIMP nsExtProtocolChannel::Delete() {
   // nothing to do
   return NS_OK;
 }
 
-NS_IMETHODIMP nsExtProtocolChannel::OnStartRequest(nsIRequest *aRequest,
-                                                   nsISupports *aContext) {
+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) {
--- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp
+++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp
@@ -206,17 +206,17 @@ nsresult nsManifestCheck::Begin() {
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsManifestCheck::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsManifestCheck::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) {
+nsManifestCheck::OnStartRequest(nsIRequest *aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsManifestCheck::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
                                  nsIInputStream *aStream, uint64_t aOffset,
                                  uint32_t aCount) {
   uint32_t bytesRead;
@@ -386,18 +386,17 @@ nsresult nsOfflineCacheUpdateItem::Cance
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsOfflineCacheUpdateItem::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsOfflineCacheUpdateItem::OnStartRequest(nsIRequest *aRequest,
-                                         nsISupports *aContext) {
+nsOfflineCacheUpdateItem::OnStartRequest(nsIRequest *aRequest) {
   mState = LoadStatus::RECEIVING;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOfflineCacheUpdateItem::OnDataAvailable(nsIRequest *aRequest,
                                           nsISupports *aContext,
@@ -1033,18 +1032,17 @@ nsresult nsOfflineManifestItem::CheckNew
 }
 
 void nsOfflineManifestItem::ReadStrictFileOriginPolicyPref() {
   mStrictFileOriginPolicy =
       Preferences::GetBool("security.fileuri.strict_origin_policy", true);
 }
 
 NS_IMETHODIMP
-nsOfflineManifestItem::OnStartRequest(nsIRequest *aRequest,
-                                      nsISupports *aContext) {
+nsOfflineManifestItem::OnStartRequest(nsIRequest *aRequest) {
   nsresult rv;
 
   nsCOMPtr<nsIHttpChannel> channel = do_QueryInterface(aRequest, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool succeeded;
   rv = channel->GetRequestSucceeded(&succeeded);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -1054,17 +1052,17 @@ nsOfflineManifestItem::OnStartRequest(ns
     LogToConsole("Offline cache manifest HTTP request failed", this);
     mParserState = PARSE_ERROR;
     return NS_ERROR_ABORT;
   }
 
   rv = GetOldManifestContentHash(aRequest);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return nsOfflineCacheUpdateItem::OnStartRequest(aRequest, aContext);
+  return nsOfflineCacheUpdateItem::OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 nsOfflineManifestItem::OnDataAvailable(nsIRequest *aRequest,
                                        nsISupports *aContext,
                                        nsIInputStream *aStream,
                                        uint64_t aOffset, uint32_t aCount) {
   uint32_t bytesRead = 0;
--- a/uriloader/prefetch/nsPrefetchService.cpp
+++ b/uriloader/prefetch/nsPrefetchService.cpp
@@ -175,17 +175,17 @@ NS_IMPL_ISUPPORTS(nsPrefetchNode, nsIReq
                   nsIInterfaceRequestor, nsIChannelEventSink,
                   nsIRedirectResultListener)
 
 //-----------------------------------------------------------------------------
 // nsPrefetchNode::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsPrefetchNode::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) {
+nsPrefetchNode::OnStartRequest(nsIRequest *aRequest) {
   nsresult rv;
 
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest, &rv);
   if (NS_FAILED(rv)) return rv;
 
   // if the load is cross origin without CORS, or the CORS access is rejected,
   // always fire load event to avoid leaking site information.
   nsCOMPtr<nsILoadInfo> loadInfo = httpChannel->LoadInfo();
--- a/widget/android/WebExecutorSupport.cpp
+++ b/widget/android/WebExecutorSupport.cpp
@@ -160,17 +160,17 @@ class LoaderListener final : public nsIS
 
   explicit LoaderListener(java::GeckoResult::Param aResult,
                           bool aAllowRedirects)
       : mResult(aResult), mAllowRedirects(aAllowRedirects) {
     MOZ_ASSERT(mResult);
   }
 
   NS_IMETHOD
-  OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) override {
+  OnStartRequest(nsIRequest* aRequest) override {
     MOZ_ASSERT(!mStream);
 
     nsresult status;
     aRequest->GetStatus(&status);
     if (NS_FAILED(status)) {
       CompleteWithError(mResult, status);
       return NS_OK;
     }
--- a/widget/windows/nsDataObj.cpp
+++ b/widget/windows/nsDataObj.cpp
@@ -124,24 +124,22 @@ nsDataObj::CStream::OnDataAvailable(
     uint32_t bytesReadByCall = 0;
     rv = aInputStream->Read((char*)(buffer + odaBytesReadTotal), aCount,
                             &bytesReadByCall);
     odaBytesReadTotal += bytesReadByCall;
   } while (aCount < odaBytesReadTotal && NS_SUCCEEDED(rv));
   return rv;
 }
 
-NS_IMETHODIMP nsDataObj::CStream::OnStartRequest(nsIRequest* aRequest,
-                                                 nsISupports* aContext) {
+NS_IMETHODIMP nsDataObj::CStream::OnStartRequest(nsIRequest* aRequest) {
   mChannelResult = NS_OK;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsDataObj::CStream::OnStopRequest(nsIRequest* aRequest,
-                                                nsISupports* aContext,
                                                 nsresult aStatusCode) {
   mChannelRead = true;
   mChannelResult = aStatusCode;
   return NS_OK;
 }
 
 // Pumps thread messages while waiting for the async listener operation to
 // complete. Failing this call will fail the stream incall from Windows