Bug 1525319 - Removing context from OnDataAvailable r=valentin
authorJonathan Kingston <jkt@mozilla.com>
Wed, 27 Feb 2019 23:42:27 +0000
changeset 522441 20fcf9d9494ac77d9c8166444e5fa8346ff13be1
parent 522440 2f665c88b0c8c0f6502088c4866778ea5e3fc0cb
child 522442 4b6ea94397b45153eccfddfac342d3076773975a
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [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 OnDataAvailable r=valentin Differential Revision: https://phabricator.services.mozilla.com/D20881
browser/base/content/nsContextMenu.js
browser/extensions/pdfjs/content/PdfStreamConverter.jsm
browser/modules/FaviconLoader.jsm
devtools/client/jsonview/converter-child.js
devtools/client/netmonitor/test/sjs_content-type-test-server.sjs
devtools/server/actors/network-monitor/network-response-listener.js
devtools/shared/webconsole/test/unit/test_throttle.js
devtools/shared/webconsole/throttle.js
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/base/test/chrome/test_bug682305.html
dom/base/test/mochitest.ini
dom/base/test/send_gzip_content.sjs
dom/fetch/FetchDriver.cpp
dom/file/MutableBlobStreamListener.cpp
dom/html/HTMLMediaElement.cpp
dom/html/MediaDocument.cpp
dom/jsurl/nsJSProtocolHandler.cpp
dom/media/ChannelMediaResource.cpp
dom/media/IdpSandbox.jsm
dom/media/WebVTTListener.cpp
dom/network/TCPSocket.cpp
dom/plugins/base/nsPluginStreamListenerPeer.cpp
dom/presentation/PresentationTCPSessionTransport.cpp
dom/presentation/provider/PresentationControlService.jsm
dom/push/PushServiceHttp2.jsm
dom/security/ContentVerifier.cpp
dom/security/nsCSPContext.cpp
dom/security/test/unit/test_csp_upgrade_insecure_request_header.js
dom/webbrowserpersist/nsWebBrowserPersist.cpp
dom/xbl/nsXBLService.cpp
dom/xhr/XMLHttpRequestMainThread.cpp
dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
dom/xul/XULDocument.cpp
extensions/pref/autoconfig/src/nsAutoConfig.cpp
gfx/thebes/gfxSVGGlyphs.cpp
image/SVGDocumentWrapper.cpp
image/VectorImage.cpp
image/decoders/icon/mac/nsIconChannelCocoa.mm
image/decoders/icon/win/nsIconChannel.cpp
image/imgLoader.cpp
image/imgRequest.cpp
image/test/unit/image_load_helpers.js
layout/style/StreamLoader.cpp
media/mtransport/ipc/WebrtcProxyChannel.cpp
mobile/android/chrome/content/CastingApps.js
modules/libjar/nsJARChannel.cpp
modules/libjar/test/unit/test_jarchannel.js
modules/libjar/zipwriter/nsDeflateConverter.cpp
modules/libjar/zipwriter/nsZipDataStream.cpp
modules/libjar/zipwriter/test/unit/test_bug399727.js
modules/libjar/zipwriter/test/unit/test_bug717061.js
netwerk/base/BackgroundFileSaver.cpp
netwerk/base/MemoryDownloader.cpp
netwerk/base/NetworkConnectivityService.cpp
netwerk/base/Predictor.cpp
netwerk/base/SimpleChannelParent.cpp
netwerk/base/nsBaseChannel.cpp
netwerk/base/nsDownloader.cpp
netwerk/base/nsIStreamListener.idl
netwerk/base/nsIncrementalDownload.cpp
netwerk/base/nsIncrementalStreamLoader.cpp
netwerk/base/nsInputStreamPump.cpp
netwerk/base/nsSimpleStreamListener.cpp
netwerk/base/nsStreamListenerTee.cpp
netwerk/base/nsStreamLoader.cpp
netwerk/base/nsSyncStreamListener.cpp
netwerk/build/components.conf
netwerk/build/nsNetCID.h
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/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/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
netwerk/test/browser/browser_nsIFormPOSTActionChannel.js
netwerk/test/httpserver/test/head_utils.js
netwerk/test/httpserver/test/test_sjs_object_state.js
netwerk/test/unit/head_cache2.js
netwerk/test/unit/head_channels.js
netwerk/test/unit/test_alt-data_stream.js
netwerk/test/unit/test_altsvc.js
netwerk/test/unit/test_anonymous-coalescing.js
netwerk/test/unit/test_auth_dialog_permission.js
netwerk/test/unit/test_backgroundfilesaver.js
netwerk/test/unit/test_bug1218029.js
netwerk/test/unit/test_bug1279246.js
netwerk/test/unit/test_bug1312774_http1.js
netwerk/test/unit/test_bug1312782_http1.js
netwerk/test/unit/test_bug1355539_http1.js
netwerk/test/unit/test_bug1378385_http1.js
netwerk/test/unit/test_bug1411316_http1.js
netwerk/test/unit/test_bug282432.js
netwerk/test/unit/test_bug365133.js
netwerk/test/unit/test_bug455311.js
netwerk/test/unit/test_bug482601.js
netwerk/test/unit/test_bug484684.js
netwerk/test/unit/test_bug515583.js
netwerk/test/unit/test_bug536324_64bit_content_length.js
netwerk/test/unit/test_bug543805.js
netwerk/test/unit/test_bug561042.js
netwerk/test/unit/test_bug596443.js
netwerk/test/unit/test_bug633743.js
netwerk/test/unit/test_bug667907.js
netwerk/test/unit/test_cacheflags.js
netwerk/test/unit/test_content_length_underrun.js
netwerk/test/unit/test_crossOriginOpenerPolicy.js
netwerk/test/unit/test_file_protocol.js
netwerk/test/unit/test_http2.js
netwerk/test/unit/test_httpResponseTimeout.js
netwerk/test/unit/test_httpsuspend.js
netwerk/test/unit/test_immutable.js
netwerk/test/unit/test_mismatch_last-modified.js
netwerk/test/unit/test_multipart_byteranges.js
netwerk/test/unit/test_multipart_streamconv-byte-by-byte.js
netwerk/test/unit/test_multipart_streamconv.js
netwerk/test/unit/test_multipart_streamconv_missing_boundary_lead_dashes.js
netwerk/test/unit/test_multipart_streamconv_missing_lead_boundary.js
netwerk/test/unit/test_origin.js
netwerk/test/unit/test_predictor.js
netwerk/test/unit/test_progress.js
netwerk/test/unit/test_range_requests.js
netwerk/test/unit/test_reentrancy.js
netwerk/test/unit/test_reopen.js
netwerk/test/unit/test_resumable_truncate.js
netwerk/test/unit/test_separate_connections.js
netwerk/test/unit/test_suspend_channel_on_examine_merged_response.js
netwerk/test/unit/test_tls_flags_separate_connections.js
netwerk/test/unit/test_trackingProtection_annotateChannels.js
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
services/common/rest.js
services/common/utils.js
testing/specialpowers/content/specialpowersAPI.js
toolkit/components/aboutmemory/content/aboutMemory.js
toolkit/components/downloads/DownloadCore.jsm
toolkit/components/downloads/test/unit/head.js
toolkit/components/extensions/test/xpcshell/test_locale_converter.js
toolkit/components/extensions/webrequest/ChannelWrapper.cpp
toolkit/components/extensions/webrequest/StreamFilterParent.cpp
toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
toolkit/components/places/FaviconHelpers.cpp
toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js
toolkit/components/reputationservice/ApplicationReputation.cpp
toolkit/components/search/SearchService.jsm
toolkit/components/telemetry/app/TelemetrySend.jsm
toolkit/components/telemetry/tests/unit/head.js
toolkit/components/url-classifier/UrlClassifierHashCompleter.jsm
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
toolkit/components/utils/SimpleServices.jsm
toolkit/modules/secondscreen/RokuApp.jsm
toolkit/mozapps/extensions/internal/XPIInstall.jsm
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/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -1147,20 +1147,20 @@ nsContextMenu.prototype = {
           // it can without waiting.
           saveURL(linkURL, linkText, dialogTitle, bypassCache, false, docURI,
                   doc, isContentWindowPrivate);
         }
         if (this.extListener)
           this.extListener.onStopRequest(aRequest, aStatusCode);
       },
 
-      onDataAvailable: function saveLinkAs_onDataAvailable(aRequest, aContext,
+      onDataAvailable: function saveLinkAs_onDataAvailable(aRequest,
                                                            aInputStream,
                                                            aOffset, aCount) {
-        this.extListener.onDataAvailable(aRequest, aContext, aInputStream,
+        this.extListener.onDataAvailable(aRequest, aInputStream,
                                          aOffset, aCount);
       },
     };
 
     function callbacks() {}
     callbacks.prototype = {
       getInterface: function sLA_callbacks_getInterface(aIID) {
         if (aIID.equals(Ci.nsIAuthPrompt) || aIID.equals(Ci.nsIAuthPrompt2)) {
--- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
+++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
@@ -290,18 +290,18 @@ class ChromeActions {
           if (this.extListener) {
             this.extListener.onStopRequest(aRequest, aStatusCode);
           }
           // Notify the content code we're done downloading.
           if (sendResponse) {
             sendResponse(false);
           }
         },
-        onDataAvailable(aRequest, aContext, aDataInputStream, aOffset, aCount) {
-          this.extListener.onDataAvailable(aRequest, aContext, aDataInputStream,
+        onDataAvailable(aRequest, aDataInputStream, aOffset, aCount) {
+          this.extListener.onDataAvailable(aRequest, aDataInputStream,
                                            aOffset, aCount);
         },
       };
 
       channel.asyncOpen(listener);
     });
   }
 
@@ -842,17 +842,17 @@ PdfStreamConverter.prototype = {
 
   // nsIStreamConverter::asyncConvertData
   asyncConvertData(aFromType, aToType, aListener, aCtxt) {
     // Store the listener passed to us
     this.listener = aListener;
   },
 
   // nsIStreamListener::onDataAvailable
-  onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) {
+  onDataAvailable(aRequest, aInputStream, aOffset, aCount) {
     if (!this.dataListener) {
       return;
     }
 
     var binaryStream = this.binaryStream;
     binaryStream.setInputStream(aInputStream);
     let chunk = new ArrayBuffer(aCount);
     binaryStream.readArrayBuffer(aCount, chunk);
@@ -937,18 +937,18 @@ PdfStreamConverter.prototype = {
     // Proxy all the request observer calls, when it gets to onStopRequest
     // we can get the dom window.  We also intentionally pass on the original
     // request(aRequest) below so we don't overwrite the original channel and
     // trigger an assertion.
     var proxy = {
       onStartRequest(request) {
         listener.onStartRequest(aRequest);
       },
-      onDataAvailable(request, context, inputStream, offset, count) {
-        listener.onDataAvailable(aRequest, null, inputStream,
+      onDataAvailable(request, inputStream, offset, count) {
+        listener.onDataAvailable(aRequest, inputStream,
                                  offset, count);
       },
       onStopRequest(request, statusCode) {
         var domWindow = getDOMWindow(channel, resourcePrincipal);
         if (!Components.isSuccessCode(statusCode) || !domWindow) {
           // The request may have been aborted and the document may have been
           // replaced with something that is not PDF.js, abort attaching.
           listener.onStopRequest(aRequest, statusCode);
--- a/browser/modules/FaviconLoader.jsm
+++ b/browser/modules/FaviconLoader.jsm
@@ -158,17 +158,17 @@ class FaviconLoad {
     }
 
     this.channel.cancel(Cr.NS_BINDING_ABORTED);
   }
 
   onStartRequest(request) {
   }
 
-  onDataAvailable(request, context, inputStream, offset, count) {
+  onDataAvailable(request, inputStream, offset, count) {
     this.stream.writeFrom(inputStream, count);
   }
 
   asyncOnChannelRedirect(oldChannel, newChannel, flags, callback) {
     if (oldChannel == this.channel) {
       this.channel = newChannel;
     }
 
--- a/devtools/client/jsonview/converter-child.js
+++ b/devtools/client/jsonview/converter-child.js
@@ -63,17 +63,17 @@ Converter.prototype = {
   convert: function(fromStream, fromType, toType, ctx) {
     return fromStream;
   },
 
   asyncConvertData: function(fromType, toType, listener, ctx) {
     this.listener = listener;
   },
 
-  onDataAvailable: function(request, context, inputStream, offset, count) {
+  onDataAvailable: function(request, inputStream, offset, count) {
     // Decode and insert data.
     const buffer = new ArrayBuffer(count);
     new BinaryInput(inputStream).readArrayBuffer(count, buffer);
     this.decodeAndInsertBuffer(buffer);
   },
 
   onStartRequest: function(request) {
     // Set the content type to HTML in order to parse the doctype, styles
@@ -112,17 +112,17 @@ Converter.prototype = {
     this.data = exportData(win, headers);
     insertJsonData(win, this.data.json);
     win.addEventListener("contentMessage", onContentMessage, false, true);
     keepThemeUpdated(win);
 
     // Send the initial HTML code.
     const buffer = new TextEncoder().encode(initialHTML(win.document)).buffer;
     const stream = new BufferStream(buffer, 0, buffer.byteLength);
-    this.listener.onDataAvailable(request, null, stream, 0, stream.available());
+    this.listener.onDataAvailable(request, stream, 0, stream.available());
   },
 
   onStopRequest: function(request, statusCode) {
     // Flush data.
     this.decodeAndInsertBuffer(new ArrayBuffer(0), true);
 
     // Stop the request.
     this.listener.onStopRequest(request, statusCode);
--- a/devtools/client/netmonitor/test/sjs_content-type-test-server.sjs
+++ b/devtools/client/netmonitor/test/sjs_content-type-test-server.sjs
@@ -11,17 +11,17 @@ function gzipCompressString(string, obs)
                 .createInstance(Ci.nsIStreamLoader);
   listener.init(obs);
   let converter = scs.asyncConvertData("uncompressed", "gzip",
                                         listener, null);
   let stringStream = Cc["@mozilla.org/io/string-input-stream;1"]
                     .createInstance(Ci.nsIStringInputStream);
   stringStream.data = string;
   converter.onStartRequest(null);
-  converter.onDataAvailable(null, null, stringStream, 0, string.length);
+  converter.onDataAvailable(null, stringStream, 0, string.length);
   converter.onStopRequest(null, null);
 }
 
 function doubleGzipCompressString(string, observer) {
   let observer2 = {
     onStreamComplete: function(loader, context, status, length, result) {
       let buffer = String.fromCharCode.apply(this, result);
       gzipCompressString(buffer, observer);
--- a/devtools/server/actors/network-monitor/network-response-listener.js
+++ b/devtools/server/actors/network-monitor/network-response-listener.js
@@ -168,17 +168,17 @@ NetworkResponseListener.prototype = {
    * https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIStreamListener
    *
    * @param nsIRequest request
    * @param nsISupports context
    * @param nsIInputStream inputStream
    * @param unsigned long offset
    * @param unsigned long count
    */
-  onDataAvailable: function(request, context, inputStream, offset, count) {
+  onDataAvailable: function(request, inputStream, offset, count) {
     this._findOpenResponse();
     const data = NetUtil.readInputStreamToString(inputStream, count);
 
     this.bodySize += count;
 
     if (!this.httpActivity.discardResponseBody) {
       const limit = Services.prefs.getIntPref("devtools.netmonitor.responseBodyLimit");
       if (this.receivedData.length <= limit || limit == 0) {
@@ -485,20 +485,20 @@ NetworkResponseListener.prototype = {
       available = stream.available();
     } catch (ex) {
       // Ignore.
     }
 
     if (available != -1) {
       if (available != 0) {
         if (this.converter) {
-          this.converter.onDataAvailable(this.request, null, stream,
+          this.converter.onDataAvailable(this.request, stream,
                                          this.offset, available);
         } else {
-          this.onDataAvailable(this.request, null, stream, this.offset,
+          this.onDataAvailable(this.request, stream, this.offset,
                                available);
         }
       }
       this.offset += available;
       this.setAsyncListener(stream, this);
     } else {
       this.onStreamClose();
       this.offset = 0;
--- a/devtools/shared/webconsole/test/unit/test_throttle.js
+++ b/devtools/shared/webconsole/test/unit/test_throttle.js
@@ -18,17 +18,17 @@ TestStreamListener.prototype = {
   onStartRequest: function() {
     this.setState("start");
   },
 
   onStopRequest: function() {
     this.setState("stop");
   },
 
-  onDataAvailable: function(request, context, inputStream, offset, count) {
+  onDataAvailable: function(request, inputStream, offset, count) {
     const sin = Cc["@mozilla.org/scriptableinputstream;1"]
           .createInstance(nsIScriptableInputStream);
     sin.init(inputStream);
     this.data = sin.read(count);
     this.setState("data");
   },
 
   setState: function(state) {
@@ -120,17 +120,17 @@ add_task(async function() {
       activitySeen = true;
     },
     null, null, null,
     activityDistributor.ACTIVITY_SUBTYPE_RESPONSE_COMPLETE,
     null, TEST_INPUT.length, null
   );
 
   // onDataAvailable is required to immediately read the data.
-  listener.onDataAvailable(null, null, testInputStream, 0, 6);
+  listener.onDataAvailable(null, testInputStream, 0, 6);
   equal(testInputStream.available(), 0, "no more data should be available");
   equal(testListener.state, "start",
      "test listener should not have received data");
   equal(activitySeen, false, "activity not distributed yet");
 
   let newState = await testListener.onStateChanged();
   equal(newState, "data", "test listener received data");
   equal(testListener.data, TEST_INPUT, "test listener received all the data");
--- a/devtools/shared/webconsole/throttle.js
+++ b/devtools/shared/webconsole/throttle.js
@@ -70,29 +70,29 @@ NetworkThrottleListener.prototype = {
   onStopRequest: function(request, statusCode) {
     this.pendingData.push({request, statusCode});
     this.queue.dataAvailable(this);
   },
 
   /**
    * @see nsIStreamListener.onDataAvailable.
    */
-  onDataAvailable: function(request, context, inputStream, offset, count) {
+  onDataAvailable: function(request, inputStream, offset, count) {
     if (this.pendingException) {
       throw this.pendingException;
     }
 
     const bin = new BinaryInputStream(inputStream);
     const bytes = new ArrayBuffer(count);
     bin.readArrayBuffer(count, bytes);
 
     const stream = new ArrayBufferInputStream();
     stream.setData(bytes, 0, count);
 
-    this.pendingData.push({request, context, stream, count});
+    this.pendingData.push({request, stream, count});
     this.queue.dataAvailable(this);
   },
 
   /**
    * Allow some buffered data from this object to be forwarded to this
    * object's originalListener.
    *
    * @param {Number} bytesPermitted The maximum number of bytes
@@ -105,30 +105,30 @@ NetworkThrottleListener.prototype = {
    *         all available data has been sent.)
    */
   sendSomeData: function(bytesPermitted) {
     if (this.pendingData.length === 0) {
       // Shouldn't happen.
       return {length: 0, done: true};
     }
 
-    const {request, context, stream, count, statusCode} = this.pendingData[0];
+    const {request, stream, count, statusCode} = this.pendingData[0];
 
     if (statusCode !== undefined) {
       this.pendingData.shift();
       this.originalListener.onStopRequest(request, statusCode);
       return {length: 0, done: true};
     }
 
     if (bytesPermitted > count) {
       bytesPermitted = count;
     }
 
     try {
-      this.originalListener.onDataAvailable(request, context, stream,
+      this.originalListener.onDataAvailable(request, stream,
                                             this.offset, bytesPermitted);
     } catch (e) {
       this.pendingException = e;
     }
 
     let done = false;
     if (bytesPermitted === count) {
       this.pendingData.shift();
--- a/docshell/base/nsPingListener.cpp
+++ b/docshell/base/nsPingListener.cpp
@@ -328,17 +328,17 @@ nsresult nsPingListener::StartTimeout(Do
 }
 
 NS_IMETHODIMP
 nsPingListener::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPingListener::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+nsPingListener::OnDataAvailable(nsIRequest* aRequest,
                                 nsIInputStream* aStream, uint64_t aOffset,
                                 uint32_t aCount) {
   uint32_t result;
   return aStream->ReadSegments(NS_DiscardSegment, nullptr, aCount, &result);
 }
 
 NS_IMETHODIMP
 nsPingListener::OnStopRequest(nsIRequest* aRequest,
--- a/dom/base/DOMParser.cpp
+++ b/dom/base/DOMParser.cpp
@@ -198,17 +198,17 @@ already_AddRefed<Document> DOMParser::Pa
   // Now start pumping data to the listener
   nsresult status;
 
   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,
+    rv = listener->OnDataAvailable(parserChannel, stream, 0,
                                    aContentLength);
     if (NS_FAILED(rv)) parserChannel->Cancel(rv);
     parserChannel->GetStatus(&status);
   }
 
   rv = listener->OnStopRequest(parserChannel, status);
   // Failure returned from OnStopRequest does not affect the final status of
   // the channel, so we do not need to call Cancel(rv) as we do above.
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -976,26 +976,25 @@ nsresult ExternalResourceMap::PendingLoa
   listener.swap(mTargetListener);
   viewer.forget(aViewer);
   newLoadGroup.forget(aLoadGroup);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ExternalResourceMap::PendingLoad::OnDataAvailable(nsIRequest* aRequest,
-                                                  nsISupports* aContext,
                                                   nsIInputStream* aStream,
                                                   uint64_t aOffset,
                                                   uint32_t aCount) {
   // mTargetListener might be null if SetupViewer or AddExternalResource failed.
   NS_ENSURE_TRUE(mTargetListener, NS_ERROR_FAILURE);
   if (mDisplayDocument->ExternalResourceMap().HaveShutDown()) {
     return NS_BINDING_ABORTED;
   }
-  return mTargetListener->OnDataAvailable(aRequest, aContext, aStream, aOffset,
+  return mTargetListener->OnDataAvailable(aRequest, aStream, aOffset,
                                           aCount);
 }
 
 NS_IMETHODIMP
 ExternalResourceMap::PendingLoad::OnStopRequest(nsIRequest* aRequest,
                                                 nsresult aStatus) {
   // mTargetListener might be null if SetupViewer or AddExternalResource failed
   if (mTargetListener) {
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -702,17 +702,17 @@ void EventSourceImpl::ParseSegment(const
     if (result == kInputEmpty) {
       return;
     }
     src = src.From(read);
   }
 }
 
 NS_IMETHODIMP
-EventSourceImpl::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+EventSourceImpl::OnDataAvailable(nsIRequest* aRequest,
                                  nsIInputStream* aInputStream, uint64_t aOffset,
                                  uint32_t aCount) {
   AssertIsOnTargetThread();
   NS_ENSURE_ARG_POINTER(aInputStream);
   if (IsClosed()) {
     return NS_ERROR_ABORT;
   }
 
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1050,17 +1050,17 @@ BeaconStreamListener::OnStartRequest(nsI
 
 NS_IMETHODIMP
 BeaconStreamListener::OnStopRequest(nsIRequest* aRequest,
                                     nsresult aStatus) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-BeaconStreamListener::OnDataAvailable(nsIRequest* aRequest, nsISupports* ctxt,
+BeaconStreamListener::OnDataAvailable(nsIRequest* aRequest,
                                       nsIInputStream* inStr,
                                       uint64_t sourceOffset, uint32_t count) {
   MOZ_ASSERT(false);
   return NS_OK;
 }
 
 bool Navigator::SendBeacon(const nsAString& aUrl,
                            const Nullable<fetch::BodyInit>& aData,
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -1042,27 +1042,26 @@ nsObjectLoadingContent::OnStopRequest(ns
 
   // Return value doesn't matter
   return NS_OK;
 }
 
 // nsIStreamListener
 NS_IMETHODIMP
 nsObjectLoadingContent::OnDataAvailable(nsIRequest* aRequest,
-                                        nsISupports* aContext,
                                         nsIInputStream* aInputStream,
                                         uint64_t aOffset, uint32_t aCount) {
   if (aRequest != mChannel) {
     return NS_BINDING_ABORTED;
   }
 
   if (mFinalListener) {
     // This may re-enter in the case of plugin listeners
     nsCOMPtr<nsIStreamListener> listenerGrip(mFinalListener);
-    return listenerGrip->OnDataAvailable(aRequest, aContext, aInputStream,
+    return listenerGrip->OnDataAvailable(aRequest, aInputStream,
                                          aOffset, aCount);
   }
 
   // We shouldn't have a connected channel with no final listener
   MOZ_ASSERT_UNREACHABLE(
       "Got data for channel with no connected final "
       "listener");
   mChannel = nullptr;
--- a/dom/base/nsSyncLoadService.cpp
+++ b/dom/base/nsSyncLoadService.cpp
@@ -340,17 +340,17 @@ nsresult nsSyncLoadService::PushSyncStre
           rv = NS_OK;
         }
         break;
       }
 
       if (readCount > UINT32_MAX) readCount = UINT32_MAX;
 
       rv = aListener->OnDataAvailable(
-          aChannel, nullptr, in,
+          aChannel, in,
           (uint32_t)std::min(sourceOffset, (uint64_t)UINT32_MAX),
           (uint32_t)readCount);
       if (NS_FAILED(rv)) {
         break;
       }
       sourceOffset += readCount;
     }
   }
--- a/dom/base/test/chrome/test_bug682305.html
+++ b/dom/base/test/chrome/test_bug682305.html
@@ -51,22 +51,21 @@ CustomChannel.prototype = {
   loadFlags: 0,
   loadGroup: null,
   name: null,
   status: Cr.NS_OK,
   asyncOpen(listener) {
     // throws an error if security checks fail
     var outListener = contentSecManager.performSecurityCheck(this, listener);
     let stream = this.open();
-    let context = null;
     try {
       outListener.onStartRequest(this);
     } catch (e) {}
     try {
-      outListener.onDataAvailable(this, context, stream, 0, stream.available());
+      outListener.onDataAvailable(this, stream, 0, stream.available());
     } catch (e) {}
     try {
       outListener.onStopRequest(this, Cr.NS_OK);
     } catch (e) {}
   },
   open() {
     // throws an error if security checks fail
     contentSecManager.performSecurityCheck(this, null);
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -759,16 +759,17 @@ tags = audiochannel
 skip-if = toolkit == 'android' # Plugins don't work on Android
 [test_postMessage_solidus.html]
 [test_postMessages.html]
 support-files = worker_postMessages.js
 [test_postMessage_originAttributes.html]
 support-files = file_receiveMessage.html
 [test_processing_instruction_update_stylesheet.xhtml]
 [test_progress_events_for_gzip_data.html]
+skip-if = toolkit == 'android'
 [test_range_bounds.html]
 skip-if = toolkit == 'android'
 [test_reentrant_flush.html]
 skip-if = toolkit == 'android'
 [test_referrer_redirect.html]
 skip-if = (verify && debug)
 [test_root_iframe.html]
 [test_screen_orientation.html]
--- a/dom/base/test/send_gzip_content.sjs
+++ b/dom/base/test/send_gzip_content.sjs
@@ -6,17 +6,17 @@ function gzipCompressString(string, obs)
                 .createInstance(Ci.nsIStreamLoader);
   listener.init(obs);
   let converter = scs.asyncConvertData("uncompressed", "gzip",
                                         listener, null);
   let stringStream = Cc["@mozilla.org/io/string-input-stream;1"]
                     .createInstance(Ci.nsIStringInputStream);
   stringStream.data = string;
   converter.onStartRequest(null, null);
-  converter.onDataAvailable(null, null, stringStream, 0, string.length);
+  converter.onDataAvailable(null, stringStream, 0, string.length);
   converter.onStopRequest(null, null, null);
 }
 
 function produceData() {
   var chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+";
   var result = '';
   for (var i = 0; i < 100000; ++i) {
     result += chars;
--- a/dom/fetch/FetchDriver.cpp
+++ b/dom/fetch/FetchDriver.cpp
@@ -248,29 +248,28 @@ AlternativeDataStreamListener::OnStartRe
     MOZ_ASSERT(mFetchDriver);
     return mFetchDriver->OnStartRequest(aRequest);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 AlternativeDataStreamListener::OnDataAvailable(nsIRequest* aRequest,
-                                               nsISupports* aContext,
                                                nsIInputStream* aInputStream,
                                                uint64_t aOffset,
                                                uint32_t aCount) {
   if (mStatus == AlternativeDataStreamListener::LOADING) {
     MOZ_ASSERT(mPipeAlternativeOutputStream);
     uint32_t read;
     return aInputStream->ReadSegments(
         NS_CopySegmentToStream, mPipeAlternativeOutputStream, aCount, &read);
   }
   if (mStatus == AlternativeDataStreamListener::FALLBACK) {
     MOZ_ASSERT(mFetchDriver);
-    return mFetchDriver->OnDataAvailable(aRequest, aContext, aInputStream,
+    return mFetchDriver->OnDataAvailable(aRequest, aInputStream,
                                          aOffset, aCount);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 AlternativeDataStreamListener::OnStopRequest(nsIRequest* aRequest,
                                              nsresult aStatusCode) {
@@ -1125,17 +1124,17 @@ nsresult CopySegmentToStreamAndSRI(nsIIn
     *aCountWritten += n;
   }
   return NS_OK;
 }
 
 }  // anonymous namespace
 
 NS_IMETHODIMP
-FetchDriver::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+FetchDriver::OnDataAvailable(nsIRequest* aRequest,
                              nsIInputStream* aInputStream, uint64_t aOffset,
                              uint32_t aCount) {
   // NB: This can be called on any thread!  But we're guaranteed that it is
   // called between OnStartRequest and OnStopRequest, so we don't need to worry
   // about races.
 
   if (mNeedToObserveOnDataAvailable) {
     mNeedToObserveOnDataAvailable = false;
--- a/dom/file/MutableBlobStreamListener.cpp
+++ b/dom/file/MutableBlobStreamListener.cpp
@@ -65,17 +65,16 @@ MutableBlobStreamListener::OnStopRequest
   }
 
   storage->GetBlobWhenReady(mParent, mContentType, mCallback);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MutableBlobStreamListener::OnDataAvailable(nsIRequest* aRequest,
-                                           nsISupports* aContext,
                                            nsIInputStream* aStream,
                                            uint64_t aSourceOffset,
                                            uint32_t aCount) {
   // This method could be called on any thread.
   MOZ_ASSERT(mStorage);
 
   uint32_t countRead;
   return aStream->ReadSegments(WriteSegmentFun, this, aCount, &countRead);
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -703,27 +703,26 @@ HTMLMediaElement::MediaLoadListener::OnS
   if (mNextListener) {
     return mNextListener->OnStopRequest(aRequest, aStatus);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLMediaElement::MediaLoadListener::OnDataAvailable(nsIRequest* aRequest,
-                                                     nsISupports* aContext,
                                                      nsIInputStream* aStream,
                                                      uint64_t aOffset,
                                                      uint32_t aCount) {
   if (!mNextListener) {
     NS_ERROR(
         "Must have a chained listener; OnStartRequest should have "
         "canceled this request");
     return NS_BINDING_ABORTED;
   }
-  return mNextListener->OnDataAvailable(aRequest, aContext, aStream, aOffset,
+  return mNextListener->OnDataAvailable(aRequest, aStream, aOffset,
                                         aCount);
 }
 
 NS_IMETHODIMP
 HTMLMediaElement::MediaLoadListener::AsyncOnChannelRedirect(
     nsIChannel* aOldChannel, nsIChannel* aNewChannel, uint32_t aFlags,
     nsIAsyncVerifyRedirectCallback* cb) {
   // TODO is this really correct?? See bug #579329.
--- a/dom/html/MediaDocument.cpp
+++ b/dom/html/MediaDocument.cpp
@@ -80,22 +80,21 @@ MediaDocumentStreamListener::OnStopReque
   if (lastPart) {
     mDocument = nullptr;
   }
   return rv;
 }
 
 NS_IMETHODIMP
 MediaDocumentStreamListener::OnDataAvailable(nsIRequest* request,
-                                             nsISupports* ctxt,
                                              nsIInputStream* inStr,
                                              uint64_t sourceOffset,
                                              uint32_t count) {
   if (mNextStream) {
-    return mNextStream->OnDataAvailable(request, ctxt, inStr, sourceOffset,
+    return mNextStream->OnDataAvailable(request, inStr, sourceOffset,
                                         count);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MediaDocumentStreamListener::CheckListenerChain() {
--- a/dom/jsurl/nsJSProtocolHandler.cpp
+++ b/dom/jsurl/nsJSProtocolHandler.cpp
@@ -939,22 +939,22 @@ nsJSChannel::SetContentLength(int64_t aC
 NS_IMETHODIMP
 nsJSChannel::OnStartRequest(nsIRequest* aRequest) {
   NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);
 
   return mListener->OnStartRequest(this);
 }
 
 NS_IMETHODIMP
-nsJSChannel::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+nsJSChannel::OnDataAvailable(nsIRequest* aRequest,
                              nsIInputStream* aInputStream, uint64_t aOffset,
                              uint32_t aCount) {
   NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);
 
-  return mListener->OnDataAvailable(this, aContext, aInputStream, aOffset,
+  return mListener->OnDataAvailable(this, aInputStream, aOffset,
                                     aCount);
 }
 
 NS_IMETHODIMP
 nsJSChannel::OnStopRequest(nsIRequest* aRequest,
                            nsresult aStatus) {
   NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);
 
--- a/dom/media/ChannelMediaResource.cpp
+++ b/dom/media/ChannelMediaResource.cpp
@@ -62,17 +62,17 @@ nsresult ChannelMediaResource::Listener:
 nsresult ChannelMediaResource::Listener::OnStopRequest(nsIRequest* aRequest,
                                                        nsresult aStatus) {
   MOZ_ASSERT(NS_IsMainThread());
   if (!mResource) return NS_OK;
   return mResource->OnStopRequest(aRequest, aStatus);
 }
 
 nsresult ChannelMediaResource::Listener::OnDataAvailable(
-    nsIRequest* aRequest, nsISupports* aContext, nsIInputStream* aStream,
+    nsIRequest* aRequest, nsIInputStream* aStream,
     uint64_t aOffset, uint32_t aCount) {
   // This might happen off the main thread.
   RefPtr<ChannelMediaResource> res;
   {
     MutexAutoLock lock(mMutex);
     res = mResource;
   }
   // Note Rekove() might happen at the same time to reset mResource. We check
--- a/dom/media/IdpSandbox.jsm
+++ b/dom/media/IdpSandbox.jsm
@@ -46,17 +46,17 @@ ResourceLoader.load = function(uri, doc)
 
     ioChannel.loadGroup = doc.documentLoadGroup.QueryInterface(Ci.nsILoadGroup);
     ioChannel.notificationCallbacks = new RedirectHttpsOnly();
     ioChannel.asyncOpen(listener);
   });
 };
 
 ResourceLoader.prototype = {
-  onDataAvailable(request, context, input, offset, count) {
+  onDataAvailable(request, input, offset, count) {
     let stream = Cc["@mozilla.org/scriptableinputstream;1"]
       .createInstance(Ci.nsIScriptableInputStream);
     stream.init(input);
     this.data += stream.read(count);
   },
 
   onStartRequest(request) {},
 
--- a/dom/media/WebVTTListener.cpp
+++ b/dom/media/WebVTTListener.cpp
@@ -114,17 +114,17 @@ nsresult WebVTTListener::ParseChunk(nsII
     return NS_ERROR_FAILURE;
   }
 
   *aWriteCount = aCount;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-WebVTTListener::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+WebVTTListener::OnDataAvailable(nsIRequest* aRequest,
                                 nsIInputStream* aStream, uint64_t aOffset,
                                 uint32_t aCount) {
   VTT_LOG("WebVTTListener::OnDataAvailable\n");
   uint32_t count = aCount;
   while (count > 0) {
     uint32_t read;
     nsresult rv = aStream->ReadSegments(ParseChunk, this, count, &read);
     NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/network/TCPSocket.cpp
+++ b/dom/network/TCPSocket.cpp
@@ -932,17 +932,17 @@ TCPSocket::OnInputStreamReady(nsIAsyncIn
 }
 
 NS_IMETHODIMP
 TCPSocket::OnStartRequest(nsIRequest* aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TCPSocket::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+TCPSocket::OnDataAvailable(nsIRequest* aRequest,
                            nsIInputStream* aStream, uint64_t aOffset,
                            uint32_t aCount) {
   if (mUseArrayBuffers) {
     nsTArray<uint8_t> buffer;
     buffer.SetCapacity(aCount);
     uint32_t actual;
     nsresult rv = aStream->Read(reinterpret_cast<char*>(buffer.Elements()),
                                 aCount, &actual);
--- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp
+++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
@@ -271,17 +271,17 @@ nsresult nsPluginStreamListenerPeer::Get
 }
 
 nsresult nsPluginStreamListenerPeer::SetStreamOffset(int32_t value) {
   mStreamOffset = value;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(
-    nsIRequest* request, nsISupports* aContext, nsIInputStream* aIStream,
+    nsIRequest* request, nsIInputStream* aIStream,
     uint64_t sourceOffset, uint32_t aLength) {
   if (mRequests.IndexOfObject(request) == -1) {
     MOZ_ASSERT(false, "Received OnDataAvailable for untracked request.");
     return NS_ERROR_UNEXPECTED;
   }
 
   if (mRequestFailed) return NS_ERROR_FAILURE;
 
--- a/dom/presentation/PresentationTCPSessionTransport.cpp
+++ b/dom/presentation/PresentationTCPSessionTransport.cpp
@@ -532,17 +532,16 @@ PresentationTCPSessionTransport::OnStopR
     SetReadyState(ReadyState::CLOSED);
   }
   return NS_OK;
 }
 
 // nsIStreamListener
 NS_IMETHODIMP
 PresentationTCPSessionTransport::OnDataAvailable(nsIRequest* aRequest,
-                                                 nsISupports* aContext,
                                                  nsIInputStream* aStream,
                                                  uint64_t aOffset,
                                                  uint32_t aCount) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (NS_WARN_IF(!mCallback)) {
     return NS_ERROR_NOT_AVAILABLE;
   }
--- a/dom/presentation/provider/PresentationControlService.jsm
+++ b/dom/presentation/provider/PresentationControlService.jsm
@@ -617,17 +617,17 @@ TCPControlChannel.prototype = {
   // nsIRequestObserver (Triggered by nsIInputStreamPump.asyncRead)
   onStopRequest(aRequest, aContext, aStatus) {
     DEBUG && log("TCPControlChannel - onStopRequest: " + aStatus +
                  " with role: " + this._direction); // jshint ignore:line
     this._stateMachine.onChannelClosed(aStatus, true);
   },
 
   // nsIStreamListener (Triggered by nsIInputStreamPump.asyncRead)
-  onDataAvailable(aRequest, aContext, aInputStream) {
+  onDataAvailable(aRequest, aInputStream) {
     let data = NetUtil.readInputStreamToString(aInputStream,
                                                aInputStream.available());
     DEBUG && log("TCPControlChannel - onDataAvailable: " + data); // jshint ignore:line
 
     // Parser of line delimited JSON. Please see |_send| for more informaiton.
     let jsonArray = data.split("\n");
     jsonArray.pop();
     for (let json of jsonArray) {
--- a/dom/push/PushServiceHttp2.jsm
+++ b/dom/push/PushServiceHttp2.jsm
@@ -56,17 +56,17 @@ PushSubscriptionListener.prototype = {
     return this.QueryInterface(aIID);
   },
 
   onStartRequest: function(aRequest) {
     console.debug("PushSubscriptionListener: onStartRequest()");
     // We do not do anything here.
   },
 
-  onDataAvailable: function(aRequest, aContext, aStream, aOffset, aCount) {
+  onDataAvailable: function(aRequest, aStream, aOffset, aCount) {
     console.debug("PushSubscriptionListener: onDataAvailable()");
     // Nobody should send data, but just to be sure, otherwise necko will
     // complain.
     if (aCount === 0) {
       return;
     }
 
     let inputStream = Cc["@mozilla.org/scriptableinputstream;1"]
@@ -110,17 +110,17 @@ var PushChannelListener = function(pushS
 };
 
 PushChannelListener.prototype = {
 
   onStartRequest: function(aRequest) {
     this._ackUri = aRequest.URI.spec;
   },
 
-  onDataAvailable: function(aRequest, aContext, aStream, aOffset, aCount) {
+  onDataAvailable: function(aRequest, aStream, aOffset, aCount) {
     console.debug("PushChannelListener: onDataAvailable()");
 
     if (aCount === 0) {
       return;
     }
 
     let inputStream = Cc["@mozilla.org/binaryinputstream;1"]
                         .createInstance(Ci.nsIBinaryInputStream);
@@ -166,17 +166,17 @@ var PushServiceDelete = function(resolve
   this._resolve = resolve;
   this._reject = reject;
 };
 
 PushServiceDelete.prototype = {
 
   onStartRequest: function(aRequest) {},
 
-  onDataAvailable: function(aRequest, aContext, aStream, aOffset, aCount) {
+  onDataAvailable: function(aRequest, aStream, aOffset, aCount) {
     // Nobody should send data, but just to be sure, otherwise necko will
     // complain.
     if (aCount === 0) {
       return;
     }
 
     let inputStream = Cc["@mozilla.org/scriptableinputstream;1"]
                         .createInstance(Ci.nsIScriptableInputStream);
@@ -207,17 +207,17 @@ var SubscriptionListener = function(aSub
   this._ctime = Date.now();
   this._retryTimeoutID = null;
 };
 
 SubscriptionListener.prototype = {
 
   onStartRequest: function(aRequest) {},
 
-  onDataAvailable: function(aRequest, aContext, aStream, aOffset, aCount) {
+  onDataAvailable: function(aRequest, aStream, aOffset, aCount) {
     console.debug("SubscriptionListener: onDataAvailable()");
 
     // We do not expect any data, but necko will complain if we do not consume
     // it.
     if (aCount === 0) {
       return;
     }
 
--- a/dom/security/ContentVerifier.cpp
+++ b/dom/security/ContentVerifier.cpp
@@ -97,17 +97,17 @@ void ContentVerifier::FinishSignature() 
   uint64_t offset = 0;
   for (uint32_t i = 0; i < mContent.Length(); ++i) {
     nsCOMPtr<nsIInputStream> oInStr;
     rv = NS_NewCStringInputStream(getter_AddRefs(oInStr), mContent[i]);
     if (NS_FAILED(rv)) {
       break;
     }
     // let the next listener know that there is data in oInStr
-    rv = nextListener->OnDataAvailable(mContentRequest, mContentContext, oInStr,
+    rv = nextListener->OnDataAvailable(mContentRequest, oInStr,
                                        offset, mContent[i].Length());
     offset += mContent[i].Length();
     if (NS_FAILED(rv)) {
       break;
     }
   }
 
   // propagate OnStopRequest and return
@@ -143,17 +143,17 @@ ContentVerifier::OnStopRequest(nsIReques
     FinishSignature();
     return aStatus;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-ContentVerifier::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+ContentVerifier::OnDataAvailable(nsIRequest* aRequest,
                                  nsIInputStream* aInputStream, uint64_t aOffset,
                                  uint32_t aCount) {
   // buffer the entire stream
   uint32_t read;
   nsresult rv =
       aInputStream->ReadSegments(AppendNextSegment, &mContent, aCount, &read);
   if (NS_FAILED(rv)) {
     return rv;
--- a/dom/security/nsCSPContext.cpp
+++ b/dom/security/nsCSPContext.cpp
@@ -1590,17 +1590,16 @@ nsresult AppendSegmentToString(nsIInputS
   nsCString* decodedData = static_cast<nsCString*>(aClosure);
   decodedData->Append(aRawSegment, aCount);
   *outWrittenCount = aCount;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 CSPViolationReportListener::OnDataAvailable(nsIRequest* aRequest,
-                                            nsISupports* aContext,
                                             nsIInputStream* aInputStream,
                                             uint64_t aOffset, uint32_t aCount) {
   uint32_t read;
   nsCString decodedData;
   return aInputStream->ReadSegments(AppendSegmentToString, &decodedData, aCount,
                                     &read);
 }
 
--- a/dom/security/test/unit/test_csp_upgrade_insecure_request_header.js
+++ b/dom/security/test/unit/test_csp_upgrade_insecure_request_header.js
@@ -41,17 +41,17 @@ var tests = [
   },
 ];
 
 function ChannelListener() {
 }
 
 ChannelListener.prototype = {
   onStartRequest(request) { },
-  onDataAvailable(request, context, stream, offset, count) {
+  onDataAvailable(request, stream, offset, count) {
     do_throw("Should not get any data!");
   },
   onStopRequest(request, status) {
     var upgrade_insecure_header = false;
     try {
       if (request.getRequestHeader("Upgrade-Insecure-Requests")) {
         upgrade_insecure_header = true;
       }
--- a/dom/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/dom/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -862,17 +862,17 @@ NS_IMETHODIMP nsWebBrowserPersist::OnSto
   return NS_OK;
 }
 
 //*****************************************************************************
 // nsWebBrowserPersist::nsIStreamListener
 //*****************************************************************************
 
 NS_IMETHODIMP
-nsWebBrowserPersist::OnDataAvailable(nsIRequest *request, nsISupports *aContext,
+nsWebBrowserPersist::OnDataAvailable(nsIRequest *request,
                                      nsIInputStream *aIStream, uint64_t aOffset,
                                      uint32_t aLength) {
   bool cancel = mCancel;
   if (!cancel) {
     nsresult rv = NS_OK;
     uint32_t bytesRemaining = aLength;
 
     nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
--- a/dom/xbl/nsXBLService.cpp
+++ b/dom/xbl/nsXBLService.cpp
@@ -171,21 +171,21 @@ nsXBLStreamListener::nsXBLStreamListener
 nsXBLStreamListener::~nsXBLStreamListener() {
   for (uint32_t i = 0; i < mBindingRequests.Length(); i++) {
     nsXBLBindingRequest* req = mBindingRequests.ElementAt(i);
     delete req;
   }
 }
 
 NS_IMETHODIMP
-nsXBLStreamListener::OnDataAvailable(nsIRequest* request, nsISupports* aCtxt,
+nsXBLStreamListener::OnDataAvailable(nsIRequest* request,
                                      nsIInputStream* aInStr,
                                      uint64_t aSourceOffset, uint32_t aCount) {
   if (mInner)
-    return mInner->OnDataAvailable(request, aCtxt, aInStr, aSourceOffset,
+    return mInner->OnDataAvailable(request, aInStr, aSourceOffset,
                                    aCount);
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsXBLStreamListener::OnStartRequest(nsIRequest* request) {
   // Make sure we don't hold on to the sink and binding document past this point
   nsCOMPtr<nsIXMLContentSink> sink;
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -1544,17 +1544,17 @@ nsresult XMLHttpRequestMainThread::Strea
     nsCOMPtr<nsIInputStream> copyStream;
     rv = NS_NewByteInputStream(getter_AddRefs(copyStream),
                                MakeSpan(fromRawSegment, count));
 
     if (NS_SUCCEEDED(rv) && xmlHttpRequest->mXMLParserStreamListener) {
       NS_ASSERTION(copyStream, "NS_NewByteInputStream lied");
       nsresult parsingResult =
           xmlHttpRequest->mXMLParserStreamListener->OnDataAvailable(
-              xmlHttpRequest->mChannel, xmlHttpRequest->mContext, copyStream,
+              xmlHttpRequest->mChannel, copyStream,
               toOffset, count);
 
       // No use to continue parsing if we failed here, but we
       // should still finish reading the stream
       if (NS_FAILED(parsingResult)) {
         xmlHttpRequest->mFlagParseBody = false;
       }
     }
@@ -1674,25 +1674,21 @@ void XMLHttpRequestMainThread::LocalFile
   mBlobStorage = nullptr;
   NS_ASSERTION(mResponseBody.IsEmpty(), "mResponseBody should be empty");
 
   ChangeStateToDone();
 }
 
 NS_IMETHODIMP
 XMLHttpRequestMainThread::OnDataAvailable(nsIRequest* request,
-                                          nsISupports* ctxt,
                                           nsIInputStream* inStr,
                                           uint64_t sourceOffset,
                                           uint32_t count) {
   NS_ENSURE_ARG_POINTER(inStr);
 
-  MOZ_ASSERT(mContext.get() == ctxt,
-             "start context different from OnDataAvailable context");
-
   mProgressSinceLastProgressEvent = true;
   XMLHttpRequest_Binding::ClearCachedResponseTextValue(this);
 
   nsresult rv;
 
   if (mResponseType == XMLHttpRequestResponseType::Blob) {
     nsCOMPtr<nsIFile> localFile;
     nsCOMPtr<nsIURI> blobURI;
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -192,17 +192,17 @@ txStylesheetSink::ReportError(const char
 }
 
 NS_IMETHODIMP
 txStylesheetSink::DidBuildModel(bool aTerminated) {
   return mCompiler->doneLoading();
 }
 
 NS_IMETHODIMP
-txStylesheetSink::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+txStylesheetSink::OnDataAvailable(nsIRequest* aRequest,
                                   nsIInputStream* aInputStream,
                                   uint64_t aOffset, uint32_t aCount) {
   if (!mCheckedForXML) {
     nsCOMPtr<nsIDTD> dtd;
     mParser->GetDTD(getter_AddRefs(dtd));
     if (dtd) {
       mCheckedForXML = true;
       if (!(dtd->GetType() & NS_IPARSER_FLAG_XML)) {
@@ -211,17 +211,17 @@ txStylesheetSink::OnDataAvailable(nsIReq
         getSpec(channel, spec);
         mCompiler->cancel(NS_ERROR_XSLT_WRONG_MIME_TYPE, nullptr, spec.get());
 
         return NS_ERROR_XSLT_WRONG_MIME_TYPE;
       }
     }
   }
 
-  return mListener->OnDataAvailable(aRequest, mParser, aInputStream, aOffset,
+  return mListener->OnDataAvailable(aRequest, aInputStream, aOffset,
                                     aCount);
 }
 
 NS_IMETHODIMP
 txStylesheetSink::OnStartRequest(nsIRequest* aRequest) {
   int32_t charsetSource = kCharsetFromDocTypeDefault;
 
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -1382,17 +1382,16 @@ XULDocument::CachedChromeStreamListener:
                                                        nsresult aStatus) {
   if (!mProtoLoaded) return NS_OK;
 
   return mDocument->OnPrototypeLoadDone(true);
 }
 
 NS_IMETHODIMP
 XULDocument::CachedChromeStreamListener::OnDataAvailable(nsIRequest* request,
-                                                         nsISupports* aContext,
                                                          nsIInputStream* aInStr,
                                                          uint64_t aSourceOffset,
                                                          uint32_t aCount) {
   MOZ_ASSERT_UNREACHABLE("CachedChromeStream doesn't receive data");
   return NS_ERROR_UNEXPECTED;
 }
 
 bool XULDocument::IsDocumentRightToLeft() {
--- a/extensions/pref/autoconfig/src/nsAutoConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsAutoConfig.cpp
@@ -62,17 +62,17 @@ void nsAutoConfig::SetConfigURL(const ch
 }
 
 NS_IMETHODIMP
 nsAutoConfig::OnStartRequest(nsIRequest *request) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsAutoConfig::OnDataAvailable(nsIRequest *request, nsISupports *context,
+nsAutoConfig::OnDataAvailable(nsIRequest *request,
                               nsIInputStream *aIStream, uint64_t aSourceOffset,
                               uint32_t aLength) {
   uint32_t amt, size;
   nsresult rv;
   char buf[1024];
 
   while (aLength) {
     size = std::min<size_t>(aLength, sizeof(buf));
--- a/gfx/thebes/gfxSVGGlyphs.cpp
+++ b/gfx/thebes/gfxSVGGlyphs.cpp
@@ -366,17 +366,17 @@ nsresult gfxSVGGlyphsDocument::ParseDocu
   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,
+    rv = listener->OnDataAvailable(channel, stream, 0,
                                    aBufLen);
     if (NS_FAILED(rv)) {
       channel->Cancel(rv);
     }
     channel->GetStatus(&status);
   }
 
   rv = listener->OnStopRequest(channel, status);
--- a/image/SVGDocumentWrapper.cpp
+++ b/image/SVGDocumentWrapper.cpp
@@ -183,20 +183,20 @@ void SVGDocumentWrapper::TickRefreshDriv
       presContext->RefreshDriver()->DoTick();
     }
   }
 }
 
 /** nsIStreamListener methods **/
 
 NS_IMETHODIMP
-SVGDocumentWrapper::OnDataAvailable(nsIRequest* aRequest, nsISupports* ctxt,
+SVGDocumentWrapper::OnDataAvailable(nsIRequest* aRequest,
                                     nsIInputStream* inStr,
                                     uint64_t sourceOffset, uint32_t count) {
-  return mListener->OnDataAvailable(aRequest, ctxt, inStr, sourceOffset, count);
+  return mListener->OnDataAvailable(aRequest, inStr, sourceOffset, count);
 }
 
 /** nsIRequestObserver methods **/
 
 NS_IMETHODIMP
 SVGDocumentWrapper::OnStartRequest(nsIRequest* aRequest) {
   nsresult rv = SetupViewer(aRequest, getter_AddRefs(mViewer),
                             getter_AddRefs(mLoadGroup));
--- a/image/VectorImage.cpp
+++ b/image/VectorImage.cpp
@@ -446,17 +446,17 @@ nsresult VectorImage::OnImageDataComplet
   return finalStatus;
 }
 
 nsresult VectorImage::OnImageDataAvailable(nsIRequest* aRequest,
                                            nsISupports* aContext,
                                            nsIInputStream* aInStr,
                                            uint64_t aSourceOffset,
                                            uint32_t aCount) {
-  return OnDataAvailable(aRequest, aContext, aInStr, aSourceOffset, aCount);
+  return OnDataAvailable(aRequest, aInStr, aSourceOffset, aCount);
 }
 
 nsresult VectorImage::StartAnimation() {
   if (mError) {
     return NS_ERROR_FAILURE;
   }
 
   MOZ_ASSERT(ShouldAnimate(), "Should not animate!");
@@ -1463,24 +1463,24 @@ void VectorImage::OnSVGDocumentError() {
   }
 }
 
 //------------------------------------------------------------------------------
 // nsIStreamListener method
 
 //******************************************************************************
 NS_IMETHODIMP
-VectorImage::OnDataAvailable(nsIRequest* aRequest, nsISupports* aCtxt,
+VectorImage::OnDataAvailable(nsIRequest* aRequest,
                              nsIInputStream* aInStr, uint64_t aSourceOffset,
                              uint32_t aCount) {
   if (mError) {
     return NS_ERROR_FAILURE;
   }
 
-  return mSVGDocumentWrapper->OnDataAvailable(aRequest, aCtxt, aInStr,
+  return mSVGDocumentWrapper->OnDataAvailable(aRequest, aInStr,
                                               aSourceOffset, aCount);
 }
 
 // --------------------------
 // Invalidation helper method
 
 void VectorImage::InvalidateObserversOnNextRefreshDriverTick() {
   if (mHasPendingInvalidation) {
--- a/image/decoders/icon/mac/nsIconChannelCocoa.mm
+++ b/image/decoders/icon/mac/nsIconChannelCocoa.mm
@@ -93,20 +93,20 @@ nsIconChannel::OnStopRequest(nsIRequest*
     mLoadGroup->RemoveRequest(this, nullptr, aStatus);
   }
 
   return NS_OK;
 }
 
 // nsIStreamListener methods
 NS_IMETHODIMP
-nsIconChannel::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext, nsIInputStream* aStream,
+nsIconChannel::OnDataAvailable(nsIRequest* aRequest, nsIInputStream* aStream,
                                uint64_t aOffset, uint32_t aCount) {
   if (mListener) {
-    return mListener->OnDataAvailable(this, aContext, aStream, aOffset, aCount);
+    return mListener->OnDataAvailable(this, aStream, aOffset, aCount);
   }
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIChannel methods:
 
 NS_IMETHODIMP
--- a/image/decoders/icon/win/nsIconChannel.cpp
+++ b/image/decoders/icon/win/nsIconChannel.cpp
@@ -729,16 +729,16 @@ nsIconChannel::OnStopRequest(nsIRequest*
   // Drop notification callbacks to prevent cycles.
   mCallbacks = nullptr;
 
   return NS_OK;
 }
 
 // nsIStreamListener methods
 NS_IMETHODIMP
-nsIconChannel::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+nsIconChannel::OnDataAvailable(nsIRequest* aRequest,
                                nsIInputStream* aStream, uint64_t aOffset,
                                uint32_t aCount) {
   if (mListener) {
-    return mListener->OnDataAvailable(this, aContext, aStream, aOffset, aCount);
+    return mListener->OnDataAvailable(this, aStream, aOffset, aCount);
   }
   return NS_OK;
 }
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -2697,24 +2697,24 @@ ProxyListener::OnStopRequest(nsIRequest*
   }
 
   return mDestListener->OnStopRequest(aRequest, status);
 }
 
 /** nsIStreamListener methods **/
 
 NS_IMETHODIMP
-ProxyListener::OnDataAvailable(nsIRequest* aRequest, nsISupports* ctxt,
+ProxyListener::OnDataAvailable(nsIRequest* aRequest,
                                nsIInputStream* inStr, uint64_t sourceOffset,
                                uint32_t count) {
   if (!mDestListener) {
     return NS_ERROR_FAILURE;
   }
 
-  return mDestListener->OnDataAvailable(aRequest, ctxt, inStr, sourceOffset,
+  return mDestListener->OnDataAvailable(aRequest, inStr, sourceOffset,
                                         count);
 }
 
 /** nsThreadRetargetableStreamListener methods **/
 NS_IMETHODIMP
 ProxyListener::CheckListenerChain() {
   NS_ASSERTION(NS_IsMainThread(), "Should be on the main thread!");
   nsresult rv = NS_OK;
@@ -2926,27 +2926,27 @@ imgCacheValidator::OnStopRequest(nsIRequ
   }
 
   return mDestListener->OnStopRequest(aRequest, status);
 }
 
 /** nsIStreamListener methods **/
 
 NS_IMETHODIMP
-imgCacheValidator::OnDataAvailable(nsIRequest* aRequest, nsISupports* ctxt,
+imgCacheValidator::OnDataAvailable(nsIRequest* aRequest,
                                    nsIInputStream* inStr, uint64_t sourceOffset,
                                    uint32_t count) {
   if (!mDestListener) {
     // XXX see bug 113959
     uint32_t _retval;
     inStr->ReadSegments(NS_DiscardSegment, nullptr, count, &_retval);
     return NS_OK;
   }
 
-  return mDestListener->OnDataAvailable(aRequest, ctxt, inStr, sourceOffset,
+  return mDestListener->OnDataAvailable(aRequest, inStr, sourceOffset,
                                         count);
 }
 
 /** nsIThreadRetargetableStreamListener methods **/
 
 NS_IMETHODIMP
 imgCacheValidator::CheckListenerChain() {
   NS_ASSERTION(NS_IsMainThread(), "Should be on the main thread!");
--- a/image/imgRequest.cpp
+++ b/image/imgRequest.cpp
@@ -740,17 +740,17 @@ imgRequest::OnStopRequest(nsIRequest* aR
   LOG_FUNC(gImgLog, "imgRequest::OnStopRequest");
   MOZ_ASSERT(NS_IsMainThread(), "Can't send notifications off-main-thread");
 
   RefPtr<Image> image = GetImage();
 
   RefPtr<imgRequest> strongThis = this;
 
   if (mIsMultiPartChannel && mNewPartPending) {
-    OnDataAvailable(aRequest, nullptr, nullptr, 0, 0);
+    OnDataAvailable(aRequest, nullptr, 0, 0);
   }
 
   // XXXldb What if this is a non-last part of a multipart request?
   // xxx before we release our reference to mRequest, lets
   // save the last status that we saw so that the
   // imgRequestProxy will have access to it.
   if (mRequest) {
     mRequest = nullptr;  // we no longer need the request
@@ -984,17 +984,17 @@ void imgRequest::FinishPreparingForNewPa
   }
 
   if (IsDecodeRequested()) {
     aResult.mImage->StartDecoding(imgIContainer::FLAG_NONE);
   }
 }
 
 NS_IMETHODIMP
-imgRequest::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+imgRequest::OnDataAvailable(nsIRequest* aRequest,
                             nsIInputStream* aInStr, uint64_t aOffset,
                             uint32_t aCount) {
   LOG_SCOPE_WITH_PARAM(gImgLog, "imgRequest::OnDataAvailable", "count", aCount);
 
   NS_ASSERTION(aRequest, "imgRequest::OnDataAvailable -- no request!");
 
   RefPtr<Image> image;
   RefPtr<ProgressTracker> progressTracker;
@@ -1057,17 +1057,17 @@ imgRequest::OnDataAvailable(nsIRequest* 
       // Something went wrong; probably a content type issue.
       Cancel(NS_IMAGELIB_ERROR_FAILURE);
       return NS_BINDING_ABORTED;
     }
   }
 
   // Notify the image that it has new data.
   if (aInStr) {
-    nsresult rv = image->OnImageDataAvailable(aRequest, aContext, aInStr,
+    nsresult rv = image->OnImageDataAvailable(aRequest, nullptr, aInStr,
                                               aOffset, aCount);
 
     if (NS_FAILED(rv)) {
       MOZ_LOG(gImgLog, LogLevel::Warning,
               ("[this=%p] imgRequest::OnDataAvailable -- "
                "copy to RasterImage failed\n",
                this));
       Cancel(NS_IMAGELIB_ERROR_FAILURE);
--- a/image/test/unit/image_load_helpers.js
+++ b/image/test/unit/image_load_helpers.js
@@ -86,20 +86,20 @@ function ChannelListener()
   this.onStartRequest = function onStartRequest(aRequest)
   {
     if (this.outputListener)
       this.outputListener.onStartRequest(aRequest);
 
     this.requestStatus |= START_REQUEST;
   }
 
-  this.onDataAvailable = function onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount)
+  this.onDataAvailable = function onDataAvailable(aRequest, aInputStream, aOffset, aCount)
   {
     if (this.outputListener)
-      this.outputListener.onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount);
+      this.outputListener.onDataAvailable(aRequest, aInputStream, aOffset, aCount);
 
     this.requestStatus |= DATA_AVAILABLE;
   }
 
   this.onStopRequest = function onStopRequest(aRequest, aStatusCode)
   {
     if (this.outputListener)
       this.outputListener.onStopRequest(aRequest, aStatusCode);
--- a/layout/style/StreamLoader.cpp
+++ b/layout/style/StreamLoader.cpp
@@ -109,17 +109,17 @@ StreamLoader::OnStopRequest(nsIRequest* 
   // accessing fields of mSheetLoadData from here.
   mSheetLoadData->mLoader->ParseSheet(utf8String, mSheetLoadData,
                                       Loader::AllowAsyncParse::Yes);
   return NS_OK;
 }
 
 /* nsIStreamListener implementation */
 NS_IMETHODIMP
-StreamLoader::OnDataAvailable(nsIRequest*, nsISupports*,
+StreamLoader::OnDataAvailable(nsIRequest*,
                               nsIInputStream* aInputStream, uint64_t,
                               uint32_t aCount) {
   if (NS_FAILED(mStatus)) {
     return mStatus;
   }
   uint32_t dummy;
   return aInputStream->ReadSegments(WriteSegmentFun, this, aCount, &dummy);
 }
--- a/media/mtransport/ipc/WebrtcProxyChannel.cpp
+++ b/media/mtransport/ipc/WebrtcProxyChannel.cpp
@@ -349,17 +349,17 @@ WebrtcProxyChannel::OnStopRequest(nsIReq
     return aStatusCode;
   }
 
   return NS_OK;
 }
 
 // nsIStreamListener
 NS_IMETHODIMP
-WebrtcProxyChannel::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+WebrtcProxyChannel::OnDataAvailable(nsIRequest* aRequest,
                                     nsIInputStream* aInputStream,
                                     uint64_t aOffset, uint32_t aCount) {
   LOG(("WebrtcProxyChannel::OnDataAvailable %p count=%u\n", this, aCount));
   MOZ_ASSERT(0, "unreachable data available");
   return NS_OK;
 }
 
 // nsIInputStreamCallback
--- a/mobile/android/chrome/content/CastingApps.js
+++ b/mobile/android/chrome/content/CastingApps.js
@@ -353,17 +353,17 @@ var CastingApps = {
             break;
           default:
             aCallback(channel.contentType);
             request.cancel(0);
             break;
         }
       },
       onStopRequest: function(request, statusCode) {},
-      onDataAvailable: function(request, context, stream, offset, count) {},
+      onDataAvailable: function(request, stream, offset, count) {},
     };
 
     if (channel) {
       channel.asyncOpen(listener);
     } else {
       aCallback(null);
     }
   },
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -1041,24 +1041,24 @@ nsJARChannel::OnStopRequest(nsIRequest *
   // To deallocate file descriptor by RemoteOpenFileChild destructor.
   mJarFile = nullptr;
 #endif
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsJARChannel::OnDataAvailable(nsIRequest *req, nsISupports *ctx,
+nsJARChannel::OnDataAvailable(nsIRequest *req,
                               nsIInputStream *stream, uint64_t offset,
                               uint32_t count) {
   LOG(("nsJARChannel::OnDataAvailable [this=%p %s]\n", this, mSpec.get()));
 
   nsresult rv;
 
-  rv = mListener->OnDataAvailable(this, nullptr, stream, offset, count);
+  rv = mListener->OnDataAvailable(this, stream, offset, count);
 
   // simply report progress here instead of hooking ourselves up as a
   // nsITransportEventSink implementation.
   // XXX do the 64-bit stuff for real
   if (mProgressSink && NS_SUCCEEDED(rv)) {
     if (NS_IsMainThread()) {
       FireOnProgress(offset + count);
     } else {
--- a/modules/libjar/test/unit/test_jarchannel.js
+++ b/modules/libjar/test/unit/test_jarchannel.js
@@ -29,17 +29,17 @@ const tmpDir = dirSvc.get("TmpD", Ci.nsI
 function Listener(callback) {
     this._callback = callback;
 }
 Listener.prototype = {
     gotStartRequest: false,
     available: -1,
     gotStopRequest: false,
     QueryInterface: ChromeUtils.generateQI(["nsIRequestObserver"]),
-    onDataAvailable(request, ctx, stream, offset, count) {
+    onDataAvailable(request, stream, offset, count) {
         try {
             this.available = stream.available();
             Assert.equal(this.available, count);
             // Need to consume stream to avoid assertion
             new nsIBinaryInputStream(stream).readBytes(count);
         } catch (ex) {
             do_throw(ex);
         }
--- a/modules/libjar/zipwriter/nsDeflateConverter.cpp
+++ b/modules/libjar/zipwriter/nsDeflateConverter.cpp
@@ -88,17 +88,16 @@ NS_IMETHODIMP nsDeflateConverter::AsyncC
   NS_ENSURE_SUCCESS(rv, rv);
 
   mListener = aListener;
   mContext = aCtxt;
   return rv;
 }
 
 NS_IMETHODIMP nsDeflateConverter::OnDataAvailable(nsIRequest *aRequest,
-                                                  nsISupports *aContext,
                                                   nsIInputStream *aInputStream,
                                                   uint64_t aOffset,
                                                   uint32_t aCount) {
   if (!mListener) return NS_ERROR_NOT_INITIALIZED;
 
   auto buffer = MakeUnique<char[]>(aCount);
   NS_ENSURE_TRUE(buffer, NS_ERROR_OUT_OF_MEMORY);
 
@@ -111,17 +110,17 @@ NS_IMETHODIMP nsDeflateConverter::OnData
 
   int zerr = Z_OK;
   // deflate loop
   while (mZstream.avail_in > 0 && zerr == Z_OK) {
     zerr = deflate(&mZstream, Z_NO_FLUSH);
 
     while (mZstream.avail_out == 0) {
       // buffer is full, push the data out to the listener
-      rv = PushAvailableData(aRequest, aContext);
+      rv = PushAvailableData(aRequest, nullptr);
       NS_ENSURE_SUCCESS(rv, rv);
       zerr = deflate(&mZstream, Z_NO_FLUSH);
     }
   }
 
   return NS_OK;
 }
 
@@ -156,17 +155,17 @@ nsresult nsDeflateConverter::PushAvailab
   if (bytesToWrite == 0) return NS_OK;
 
   MOZ_ASSERT(bytesToWrite <= INT32_MAX);
   nsCOMPtr<nsIInputStream> stream;
   nsresult rv = NS_NewByteInputStream(
       getter_AddRefs(stream), MakeSpan((char *)mWriteBuffer, bytesToWrite));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = mListener->OnDataAvailable(aRequest, mContext, stream, mOffset,
+  rv = mListener->OnDataAvailable(aRequest, stream, mOffset,
                                   bytesToWrite);
 
   // now set the state for 'deflate'
   mZstream.next_out = mWriteBuffer;
   mZstream.avail_out = sizeof(mWriteBuffer);
 
   mOffset += bytesToWrite;
   return rv;
--- a/modules/libjar/zipwriter/nsZipDataStream.cpp
+++ b/modules/libjar/zipwriter/nsZipDataStream.cpp
@@ -51,29 +51,28 @@ nsresult nsZipDataStream::Init(nsZipWrit
   } else {
     mHeader->mMethod = ZIP_METHOD_STORE;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsZipDataStream::OnDataAvailable(nsIRequest *aRequest,
-                                               nsISupports *aContext,
                                                nsIInputStream *aInputStream,
                                                uint64_t aOffset,
                                                uint32_t aCount) {
   if (!mOutput) return NS_ERROR_NOT_INITIALIZED;
 
   auto buffer = MakeUnique<char[]>(aCount);
   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);
+  return ProcessData(aRequest, nullptr, buffer.get(), aOffset, aCount);
 }
 
 NS_IMETHODIMP nsZipDataStream::OnStartRequest(nsIRequest *aRequest) {
   if (!mOutput) return NS_ERROR_NOT_INITIALIZED;
 
   return mOutput->OnStartRequest(aRequest);
 }
 
@@ -117,17 +116,17 @@ nsresult nsZipDataStream::ProcessData(ns
       mHeader->mCRC, reinterpret_cast<const unsigned char *>(aBuffer), aCount);
 
   MOZ_ASSERT(aCount <= INT32_MAX);
   nsCOMPtr<nsIInputStream> stream;
   nsresult rv =
       NS_NewByteInputStream(getter_AddRefs(stream), MakeSpan(aBuffer, aCount));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = mOutput->OnDataAvailable(aRequest, aContext, stream, aOffset, aCount);
+  rv = mOutput->OnDataAvailable(aRequest, stream, aOffset, aCount);
   mHeader->mUSize += aCount;
 
   return rv;
 }
 
 nsresult nsZipDataStream::ReadStream(nsIInputStream *aStream) {
   if (!mOutput) return NS_ERROR_NOT_INITIALIZED;
 
--- a/modules/libjar/zipwriter/test/unit/test_bug399727.js
+++ b/modules/libjar/zipwriter/test/unit/test_bug399727.js
@@ -26,17 +26,17 @@ BinaryComparer.prototype = {
 
   onStopRequest(aRequest, aStatusCode) {
     this.fileStream.close();
     Assert.equal(aStatusCode, Cr.NS_OK);
     Assert.equal(this.offset, this.length);
     this.callback();
   },
 
-  onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) {
+  onDataAvailable(aRequest, aInputStream, aOffset, aCount) {
     var stream = Cc["@mozilla.org/binaryinputstream;1"].
                  createInstance(Ci.nsIBinaryInputStream);
     stream.setInputStream(aInputStream);
     var source, actual;
     for (var i = 0; i < aCount; i++) {
       try {
         source = this.fileStream.read8();
       } catch (e) {
--- a/modules/libjar/zipwriter/test/unit/test_bug717061.js
+++ b/modules/libjar/zipwriter/test/unit/test_bug717061.js
@@ -25,17 +25,17 @@ BinaryComparer.prototype = {
 
   onStopRequest(aRequest, aStatusCode) {
     this.fileStream.close();
     Assert.equal(aStatusCode, Cr.NS_OK);
     Assert.equal(this.offset, this.length);
     this.callback();
   },
 
-  onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) {
+  onDataAvailable(aRequest, aInputStream, aOffset, aCount) {
     var stream = Cc["@mozilla.org/binaryinputstream;1"].
       createInstance(Ci.nsIBinaryInputStream);
     stream.setInputStream(aInputStream);
     var source, actual;
     for (var i = 0; i < aCount; i++) {
       try {
         source = this.fileStream.read8();
       } catch (e) {
--- a/netwerk/base/BackgroundFileSaver.cpp
+++ b/netwerk/base/BackgroundFileSaver.cpp
@@ -981,17 +981,16 @@ BackgroundFileSaverStreamListener::OnSto
     Finish(aStatusCode);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 BackgroundFileSaverStreamListener::OnDataAvailable(nsIRequest *aRequest,
-                                                   nsISupports *aContext,
                                                    nsIInputStream *aInputStream,
                                                    uint64_t aOffset,
                                                    uint32_t aCount) {
   nsresult rv;
 
   NS_ENSURE_ARG(aRequest);
 
   // Read the requested data.  Since the pipe has an infinite buffer, we don't
--- a/netwerk/base/MemoryDownloader.cpp
+++ b/netwerk/base/MemoryDownloader.cpp
@@ -48,17 +48,17 @@ nsresult MemoryDownloader::ConsumeData(n
     self->mStatus = NS_ERROR_OUT_OF_MEMORY;
     return NS_ERROR_OUT_OF_MEMORY;
   }
   *aWriteCount = aCount;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-MemoryDownloader::OnDataAvailable(nsIRequest* aRequest, nsISupports* aCtxt,
+MemoryDownloader::OnDataAvailable(nsIRequest* aRequest,
                                   nsIInputStream* aInStr,
                                   uint64_t aSourceOffset, uint32_t aCount) {
   uint32_t n;
   MOZ_ASSERT(mData);
   nsresult rv = aInStr->ReadSegments(ConsumeData, this, aCount, &n);
   if (NS_SUCCEEDED(mStatus) && NS_FAILED(rv)) {
     mStatus = rv;
   }
--- a/netwerk/base/NetworkConnectivityService.cpp
+++ b/netwerk/base/NetworkConnectivityService.cpp
@@ -287,17 +287,16 @@ NetworkConnectivityService::OnStopReques
     NotifyObservers("network:connectivity-service:ip-checks-complete");
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 NetworkConnectivityService::OnDataAvailable(nsIRequest *aRequest,
-                                            nsISupports *aContext,
                                             nsIInputStream *aInputStream,
                                             uint64_t aOffset, uint32_t aCount) {
   nsAutoCString data;
   Unused << NS_ReadInputStreamToString(aInputStream, data, aCount);
   return NS_OK;
 }
 
 }  // namespace net
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -2378,17 +2378,16 @@ Predictor::PrefetchListener::OnStopReque
   }
 
   return rv;
 }
 
 // nsIStreamListener
 NS_IMETHODIMP
 Predictor::PrefetchListener::OnDataAvailable(nsIRequest *aRequest,
-                                             nsISupports *aContext,
                                              nsIInputStream *aInputStream,
                                              uint64_t aOffset,
                                              const uint32_t aCount) {
   uint32_t result;
   return aInputStream->ReadSegments(NS_DiscardSegment, nullptr, aCount,
                                     &result);
 }
 
--- a/netwerk/base/SimpleChannelParent.cpp
+++ b/netwerk/base/SimpleChannelParent.cpp
@@ -89,17 +89,16 @@ SimpleChannelParent::OnStopRequest(nsIRe
                                    nsresult aStatusCode) {
   // See above.
   MOZ_ASSERT(NS_FAILED(aStatusCode));
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SimpleChannelParent::OnDataAvailable(nsIRequest* aRequest,
-                                     nsISupports* aContext,
                                      nsIInputStream* aInputStream,
                                      uint64_t aOffset, uint32_t aCount) {
   // See above.
   MOZ_CRASH("Should never be called");
 }
 
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/base/nsBaseChannel.cpp
+++ b/netwerk/base/nsBaseChannel.cpp
@@ -791,23 +791,23 @@ nsBaseChannel::OnStopRequest(nsIRequest 
 
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsBaseChannel::nsIStreamListener
 
 NS_IMETHODIMP
-nsBaseChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
+nsBaseChannel::OnDataAvailable(nsIRequest *request,
                                nsIInputStream *stream, uint64_t offset,
                                uint32_t count) {
   SUSPEND_PUMP_FOR_SCOPE();
 
   nsresult rv =
-      mListener->OnDataAvailable(this, nullptr, stream, offset, count);
+      mListener->OnDataAvailable(this, stream, offset, count);
   if (mSynthProgressEvents && NS_SUCCEEDED(rv)) {
     int64_t prog = offset + count;
     if (NS_IsMainThread()) {
       OnTransportStatus(nullptr, NS_NET_STATUS_READING, prog, mContentLength);
     } else {
       class OnTransportStatusAsyncEvent : public mozilla::Runnable {
         RefPtr<nsBaseChannel> mChannel;
         int64_t mProgress;
--- a/netwerk/base/nsDownloader.cpp
+++ b/netwerk/base/nsDownloader.cpp
@@ -87,14 +87,14 @@ nsresult nsDownloader::ConsumeData(nsIIn
   nsDownloader *self = (nsDownloader *)closure;
   if (self->mSink) return self->mSink->Write(fromRawSegment, count, writeCount);
 
   *writeCount = count;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDownloader::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
+nsDownloader::OnDataAvailable(nsIRequest *request,
                               nsIInputStream *inStr, uint64_t sourceOffset,
                               uint32_t count) {
   uint32_t n;
   return inStr->ReadSegments(ConsumeData, this, count, &n);
 }
--- a/netwerk/base/nsIStreamListener.idl
+++ b/netwerk/base/nsIStreamListener.idl
@@ -14,27 +14,25 @@ interface nsIInputStream;
 interface nsIStreamListener : nsIRequestObserver
 {
     /**
      * Called when the next chunk of data (corresponding to the request) may
      * be read without blocking the calling thread.  The onDataAvailable impl
      * must read exactly |aCount| bytes of data before returning.
      *
      * @param aRequest request corresponding to the source of the data
-     * @param aContext user defined context
      * @param aInputStream input stream containing the data chunk
      * @param aOffset
      *        Number of bytes that were sent in previous onDataAvailable calls
      *        for this request. In other words, the sum of all previous count
      *        parameters.
      * @param aCount number of bytes available in the stream
      *
      * NOTE: The aInputStream parameter must implement readSegments.
      *
      * An exception thrown from onDataAvailable has the side-effect of
      * causing the request to be canceled.
      */
     void onDataAvailable(in nsIRequest aRequest,
-                         in nsISupports aContext, 
                          in nsIInputStream aInputStream,
                          in unsigned long long aOffset,
                          in unsigned long aCount);
 };
--- a/netwerk/base/nsIncrementalDownload.cpp
+++ b/netwerk/base/nsIncrementalDownload.cpp
@@ -666,17 +666,16 @@ nsIncrementalDownload::OnStopRequest(nsI
 
   return StartTimer(mInterval);  // Do next chunk
 }
 
 // nsIStreamListener
 
 NS_IMETHODIMP
 nsIncrementalDownload::OnDataAvailable(nsIRequest *request,
-                                       nsISupports *context,
                                        nsIInputStream *input, uint64_t offset,
                                        uint32_t count) {
   while (count) {
     uint32_t space = mChunkSize - mChunkLen;
     uint32_t n, len = std::min(space, count);
 
     nsresult rv = input->Read(&mChunk[mChunkLen], len, &n);
     if (NS_FAILED(rv)) return rv;
--- a/netwerk/base/nsIncrementalStreamLoader.cpp
+++ b/netwerk/base/nsIncrementalStreamLoader.cpp
@@ -168,17 +168,16 @@ nsresult nsIncrementalStreamLoader::Writ
   self->mBytesConsumed += consumedCount;
   *writeCount = count;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsIncrementalStreamLoader::OnDataAvailable(nsIRequest *request,
-                                           nsISupports *ctxt,
                                            nsIInputStream *inStr,
                                            uint64_t sourceOffset,
                                            uint32_t count) {
   if (mObserver) {
     // provide nsIIncrementalStreamLoader::request during call to
     // OnStreamComplete
     mRequest = request;
   }
--- a/netwerk/base/nsInputStreamPump.cpp
+++ b/netwerk/base/nsInputStreamPump.cpp
@@ -546,17 +546,17 @@ uint32_t nsInputStreamPump::OnStateTrans
          "(%u)]\n",
          mStreamOffset, avail, odaAvail));
 
     {
       // 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->OnDataAvailable(this, nullptr, mAsyncStream,
+      rv = mListener->OnDataAvailable(this, mAsyncStream,
                                       mStreamOffset, odaAvail);
     }
 
     // don't enter this code if ODA failed or called Cancel
     if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(mStatus)) {
       // test to see if this ODA failed to consume data
       if (tellable) {
         // NOTE: if Tell fails, which can happen if the stream is
--- a/netwerk/base/nsSimpleStreamListener.cpp
+++ b/netwerk/base/nsSimpleStreamListener.cpp
@@ -35,17 +35,16 @@ nsSimpleStreamListener::OnStopRequest(ns
 
 //
 //----------------------------------------------------------------------------
 // nsIStreamListener implementation...
 //----------------------------------------------------------------------------
 //
 NS_IMETHODIMP
 nsSimpleStreamListener::OnDataAvailable(nsIRequest *request,
-                                        nsISupports *aContext,
                                         nsIInputStream *aSource,
                                         uint64_t aOffset, uint32_t aCount) {
   uint32_t writeCount;
   nsresult rv = mSink->WriteFrom(aSource, aCount, &writeCount);
   //
   // Equate zero bytes read and NS_SUCCEEDED to stopping the read.
   //
   if (NS_SUCCEEDED(rv) && (writeCount == 0)) return NS_BASE_STREAM_CLOSED;
--- a/netwerk/base/nsStreamListenerTee.cpp
+++ b/netwerk/base/nsStreamListenerTee.cpp
@@ -41,17 +41,17 @@ nsStreamListenerTee::OnStopRequest(nsIRe
 
   nsresult rv = mListener->OnStopRequest(request, status);
   if (mObserver) mObserver->OnStopRequest(request, status);
   mObserver = nullptr;
   return rv;
 }
 
 NS_IMETHODIMP
-nsStreamListenerTee::OnDataAvailable(nsIRequest *request, nsISupports *context,
+nsStreamListenerTee::OnDataAvailable(nsIRequest *request,
                                      nsIInputStream *input, uint64_t offset,
                                      uint32_t count) {
   NS_ENSURE_TRUE(mListener, NS_ERROR_NOT_INITIALIZED);
   NS_ENSURE_TRUE(mSink, NS_ERROR_NOT_INITIALIZED);
 
   nsCOMPtr<nsIInputStream> tee;
   nsresult rv;
 
@@ -68,17 +68,17 @@ nsStreamListenerTee::OnDataAvailable(nsI
   } else {
     // re-initialize the input tee since the input stream may have changed.
     rv = mInputTee->SetSource(input);
     if (NS_FAILED(rv)) return rv;
 
     tee = mInputTee;
   }
 
-  return mListener->OnDataAvailable(request, context, tee, offset, count);
+  return mListener->OnDataAvailable(request, tee, offset, count);
 }
 
 NS_IMETHODIMP
 nsStreamListenerTee::CheckListenerChain() {
   NS_ASSERTION(NS_IsMainThread(), "Should be on main thread!");
   nsresult rv = NS_OK;
   nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
       do_QueryInterface(mListener, &rv);
--- a/netwerk/base/nsStreamLoader.cpp
+++ b/netwerk/base/nsStreamLoader.cpp
@@ -122,17 +122,17 @@ nsresult nsStreamLoader::WriteSegmentFun
   }
 
   *writeCount = count;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsStreamLoader::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
+nsStreamLoader::OnDataAvailable(nsIRequest *request,
                                 nsIInputStream *inStr, uint64_t sourceOffset,
                                 uint32_t count) {
   uint32_t countRead;
   return inStr->ReadSegments(WriteSegmentFun, this, count, &countRead);
 }
 
 void nsStreamLoader::ReleaseData() { mData.clearAndFree(); }
 
--- a/netwerk/base/nsSyncStreamListener.cpp
+++ b/netwerk/base/nsSyncStreamListener.cpp
@@ -60,17 +60,17 @@ nsSyncStreamListener::GetInputStream(nsI
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 nsSyncStreamListener::OnStartRequest(nsIRequest *request) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsSyncStreamListener::OnDataAvailable(nsIRequest *request, nsISupports *context,
+nsSyncStreamListener::OnDataAvailable(nsIRequest *request,
                                       nsIInputStream *stream, uint64_t offset,
                                       uint32_t count) {
   uint32_t bytesWritten;
 
   nsresult rv = mPipeOut->WriteFrom(stream, count, &bytesWritten);
 
   // if we get an error, then return failure.  this will cause the
   // channel to be canceled, and as a result our OnStopRequest method
--- a/netwerk/build/components.conf
+++ b/netwerk/build/components.conf
@@ -393,17 +393,17 @@ Classes = [
     },
     {
         'cid': '{831f8f13-7aa8-485f-b02e-77c881cc5773}',
         'contract_ids': ['@mozilla.org/network/stream-listener-tee;1'],
         'type': 'mozilla::net::nsStreamListenerTee',
         'headers': ['/netwerk/base/nsStreamListenerTee.h'],
     },
     {
-        'cid': '{5ba6d920-d4e9-11d3-a1a5-0050041caf44}',
+        'cid': '{9879908a-2972-40c0-890b-a91dd7dfb954}',
         'contract_ids': ['@mozilla.org/network/stream-loader;1'],
         'legacy_constructor': 'mozilla::net::nsStreamLoader::Create',
         'headers': ['/netwerk/base/nsStreamLoader.h'],
     },
     {
         'cid': '{0885d4f8-f7b8-4cda-902e-94ba38bc256e}',
         'contract_ids': ['@mozilla.org/network/stream-transport-service;1'],
         'type': 'mozilla::net::nsStreamTransportService',
--- a/netwerk/build/nsNetCID.h
+++ b/netwerk/build/nsNetCID.h
@@ -196,21 +196,21 @@
   { /* 6ddb050c-0d04-11d4-986e-00c04fa0cf4a */       \
     0x6ddb050c, 0x0d04, 0x11d4, {                    \
       0x98, 0x6e, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a \
     }                                                \
   }
 
 // component implementing nsIStreamLoader.
 #define NS_STREAMLOADER_CONTRACTID "@mozilla.org/network/stream-loader;1"
-#define NS_STREAMLOADER_CID                        \
-  { /* 5BA6D920-D4E9-11d3-A1A5-0050041CAF44 */     \
-    0x5ba6d920, 0xd4e9, 0x11d3, {                  \
-      0xa1, 0xa5, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 \
-    }                                              \
+#define NS_STREAMLOADER_CID                          \
+  { /* 9879908a-2972-40c0-890b-a91dd7dfb954 */       \
+    0x9879908a, 0x2972, 0x40c0, {                    \
+      0x89, 0x0b, 0xa9, 0x1d, 0xd7, 0xdf, 0xb9, 0x54 \
+    }                                                \
   }
 
 // component implementing nsIStreamLoader.
 #define NS_INCREMENTALSTREAMLOADER_CONTRACTID \
   "@mozilla.org/network/incremental-stream-loader;1"
 #define NS_INCREMENTALSTREAMLOADER_CID               \
   { /* 5d6352a3-b9c3-4fa3-87aa-b2a3c6e5a501 */       \
     0x5d6352a3, 0xb9c3, 0x4fa3, {                    \
--- a/netwerk/dns/TRR.cpp
+++ b/netwerk/dns/TRR.cpp
@@ -1010,17 +1010,17 @@ TRR::OnStopRequest(nsIRequest *aRequest,
 
   LOG(("TRR:OnStopRequest %p status %x mFailed %d\n", this, (int)aStatusCode,
        mFailed));
   FailData(NS_ERROR_UNKNOWN_HOST);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TRR::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
+TRR::OnDataAvailable(nsIRequest *aRequest,
                      nsIInputStream *aInputStream, uint64_t aOffset,
                      const uint32_t aCount) {
   LOG(("TRR:OnDataAvailable %p %s %d failed=%d aCount=%u\n", this, mHost.get(),
        mType, mFailed, (unsigned int)aCount));
   // receive DNS response into the local buffer
   if (mFailed) {
     return NS_ERROR_FAILURE;
   }
--- a/netwerk/protocol/about/nsAboutCacheEntry.cpp
+++ b/netwerk/protocol/about/nsAboutCacheEntry.cpp
@@ -507,17 +507,16 @@ nsAboutCacheEntry::Channel::OnStartReque
 
   NS_NAMED_LITERAL_CSTRING(buffer, "<hr/>\n<pre>");
   uint32_t n;
   return mOutputStream->Write(buffer.get(), buffer.Length(), &n);
 }
 
 NS_IMETHODIMP
 nsAboutCacheEntry::Channel::OnDataAvailable(nsIRequest *request,
-                                            nsISupports *ctx,
                                             nsIInputStream *aInputStream,
                                             uint64_t aOffset, uint32_t aCount) {
   uint32_t n;
   return aInputStream->ReadSegments(&nsAboutCacheEntry::Channel::PrintCacheData,
                                     this, aCount, &n);
 }
 
 /* static */ nsresult nsAboutCacheEntry::Channel::PrintCacheData(
--- a/netwerk/protocol/data/DataChannelParent.cpp
+++ b/netwerk/protocol/data/DataChannelParent.cpp
@@ -88,17 +88,17 @@ NS_IMETHODIMP
 DataChannelParent::OnStopRequest(nsIRequest *aRequest,
                                  nsresult aStatusCode) {
   // See above.
   MOZ_ASSERT(NS_FAILED(aStatusCode));
   return NS_OK;
 }
 
 NS_IMETHODIMP
-DataChannelParent::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
+DataChannelParent::OnDataAvailable(nsIRequest *aRequest,
                                    nsIInputStream *aInputStream,
                                    uint64_t aOffset, uint32_t aCount) {
   // See above.
   MOZ_CRASH("Should never be called");
 }
 
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/protocol/file/FileChannelParent.cpp
+++ b/netwerk/protocol/file/FileChannelParent.cpp
@@ -88,17 +88,17 @@ NS_IMETHODIMP
 FileChannelParent::OnStopRequest(nsIRequest *aRequest,
                                  nsresult aStatusCode) {
   // See above.
   MOZ_ASSERT(NS_FAILED(aStatusCode));
   return NS_OK;
 }
 
 NS_IMETHODIMP
-FileChannelParent::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
+FileChannelParent::OnDataAvailable(nsIRequest *aRequest,
                                    nsIInputStream *aInputStream,
                                    uint64_t aOffset, uint32_t aCount) {
   // See above.
   MOZ_CRASH("Should never be called");
 }
 
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/protocol/ftp/FTPChannelChild.cpp
+++ b/netwerk/protocol/ftp/FTPChannelChild.cpp
@@ -426,17 +426,17 @@ void FTPChannelChild::DoOnDataAvailable(
       NS_NewByteInputStream(getter_AddRefs(stringStream),
                             MakeSpan(data).To(count), NS_ASSIGNMENT_DEPEND);
   if (NS_FAILED(rv)) {
     Cancel(rv);
     return;
   }
 
   AutoEventEnqueuer ensureSerialDispatch(mEventQ);
-  rv = mListener->OnDataAvailable(this, nullptr, stringStream, offset, count);
+  rv = mListener->OnDataAvailable(this, stringStream, offset, count);
   if (NS_FAILED(rv)) Cancel(rv);
   stringStream->Close();
 }
 
 class FTPStopRequestEvent : public NeckoTargetChannelEvent<FTPChannelChild> {
  public:
   FTPStopRequestEvent(FTPChannelChild* aChild, const nsresult& aChannelStatus,
                       const nsCString& aErrorMsg, bool aUseUTF8)
--- a/netwerk/protocol/ftp/FTPChannelParent.cpp
+++ b/netwerk/protocol/ftp/FTPChannelParent.cpp
@@ -268,17 +268,17 @@ void FTPChannelParent::DivertOnDataAvail
       mChannel->Cancel(rv);
     }
     mStatus = rv;
     return;
   }
 
   AutoEventEnqueuer ensureSerialDispatch(mEventQ);
 
-  rv = OnDataAvailable(mChannel, nullptr, stringStream, offset, count);
+  rv = OnDataAvailable(mChannel, stringStream, offset, count);
 
   stringStream->Close();
   if (NS_FAILED(rv)) {
     if (mChannel) {
       mChannel->Cancel(rv);
     }
     mStatus = rv;
   }
@@ -459,25 +459,25 @@ FTPChannelParent::OnStopRequest(nsIReque
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // FTPChannelParent::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-FTPChannelParent::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+FTPChannelParent::OnDataAvailable(nsIRequest* aRequest,
                                   nsIInputStream* aInputStream,
                                   uint64_t aOffset, uint32_t aCount) {
   LOG(("FTPChannelParent::OnDataAvailable [this=%p]\n", this));
 
   if (mDivertingFromChild) {
     MOZ_RELEASE_ASSERT(mDivertToListener,
                        "Cannot divert if listener is unset!");
-    return mDivertToListener->OnDataAvailable(aRequest, aContext, aInputStream,
+    return mDivertToListener->OnDataAvailable(aRequest, aInputStream,
                                               aOffset, aCount);
   }
 
   nsCString data;
   nsresult rv = NS_ReadInputStreamToString(aInputStream, data, aCount);
   if (NS_FAILED(rv)) return rv;
 
   if (mIPCClosed || !SendOnDataAvailable(mStatus, data, aOffset, aCount))
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -772,17 +772,16 @@ TransactionObserver::OnStartRequest(nsIR
   MOZ_ASSERT(NS_IsMainThread());
   // only consider the first 32KB.. because really.
   mWKResponse.SetCapacity(MAX_WK);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TransactionObserver::OnDataAvailable(nsIRequest *aRequest,
-                                     nsISupports *aContext,
                                      nsIInputStream *aStream, uint64_t aOffset,
                                      uint32_t aCount) {
   MOZ_ASSERT(NS_IsMainThread());
   uint32_t oldLen = mWKResponse.Length();
   uint64_t newLen = aCount + oldLen;
   if (newLen < MAX_WK) {
     nsresult rv;
     auto handle = mWKResponse.BulkWrite(newLen, oldLen, false, rv);
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -1158,20 +1158,20 @@ class InterceptFailedOnStop : public nsI
     if (NS_FAILED(aStatusCode) && NS_SUCCEEDED(mChannel->mStatus)) {
       LOG(("HttpBaseChannel::InterceptFailedOnStop %p seting status %" PRIx32,
            mChannel, static_cast<uint32_t>(aStatusCode)));
       mChannel->mStatus = aStatusCode;
     }
     return mNext->OnStopRequest(aRequest, aStatusCode);
   }
 
-  NS_IMETHOD OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+  NS_IMETHOD OnDataAvailable(nsIRequest* aRequest,
                              nsIInputStream* aInputStream, uint64_t aOffset,
                              uint32_t aCount) override {
-    return mNext->OnDataAvailable(aRequest, aContext, aInputStream, aOffset,
+    return mNext->OnDataAvailable(aRequest, aInputStream, aOffset,
                                   aCount);
   }
 };
 
 NS_IMPL_ISUPPORTS(InterceptFailedOnStop, nsIStreamListener, nsIRequestObserver)
 
 NS_IMETHODIMP
 HttpBaseChannel::DoApplyContentConversions(nsIStreamListener* aNextListener,
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -106,41 +106,40 @@ InterceptStreamListener::OnProgress(nsIR
   if (mOwner) {
     mOwner->DoOnProgress(mOwner, aProgress, aProgressMax);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 InterceptStreamListener::OnDataAvailable(nsIRequest* aRequest,
-                                         nsISupports* aContext,
                                          nsIInputStream* aInputStream,
                                          uint64_t aOffset, uint32_t aCount) {
   if (!mOwner) {
     return NS_OK;
   }
 
   uint32_t loadFlags;
   mOwner->GetLoadFlags(&loadFlags);
 
   if (!(loadFlags & HttpBaseChannel::LOAD_BACKGROUND)) {
     nsCOMPtr<nsIURI> uri;
     mOwner->GetURI(getter_AddRefs(uri));
 
     nsAutoCString host;
     uri->GetHost(host);
 
-    OnStatus(mOwner, aContext, NS_NET_STATUS_READING,
+    OnStatus(mOwner, nullptr, NS_NET_STATUS_READING,
              NS_ConvertUTF8toUTF16(host).get());
 
     int64_t progress = aOffset + aCount;
-    OnProgress(mOwner, aContext, progress, mOwner->mSynthesizedStreamLength);
+    OnProgress(mOwner, nullptr, progress, mOwner->mSynthesizedStreamLength);
   }
 
-  mOwner->DoOnDataAvailable(mOwner, mContext, aInputStream, aOffset, aCount);
+  mOwner->DoOnDataAvailable(mOwner, nullptr, aInputStream, aOffset, aCount);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 InterceptStreamListener::OnStopRequest(nsIRequest* aRequest,
                                        nsresult aStatusCode) {
   if (mOwner) {
     mOwner->DoPreOnStopRequest(aStatusCode);
@@ -618,17 +617,17 @@ class SyntheticDiversionListener final :
     if (mChannel->mIPCOpen) {
       mChannel->SendDivertOnStopRequest(aStatus);
       mChannel->SendDivertComplete();
     }
     return NS_OK;
   }
 
   NS_IMETHOD
-  OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+  OnDataAvailable(nsIRequest* aRequest,
                   nsIInputStream* aInputStream, uint64_t aOffset,
                   uint32_t aCount) override {
     if (!mChannel->mIPCOpen) {
       aRequest->Cancel(NS_ERROR_ABORT);
       return NS_ERROR_ABORT;
     }
 
     nsAutoCString data;
@@ -958,17 +957,17 @@ void HttpChannelChild::DoOnDataAvailable
                                          nsISupports* aContext,
                                          nsIInputStream* aStream,
                                          uint64_t offset, uint32_t count) {
   AUTO_PROFILER_LABEL("HttpChannelChild::DoOnDataAvailable", NETWORK);
   LOG(("HttpChannelChild::DoOnDataAvailable [this=%p]\n", this));
   if (mCanceled) return;
 
   nsresult rv =
-      mListener->OnDataAvailable(aRequest, aContext, aStream, offset, count);
+      mListener->OnDataAvailable(aRequest, aStream, offset, count);
   if (NS_FAILED(rv)) {
     CancelOnMainThread(rv);
   }
 }
 
 class StopRequestEvent : public NeckoTargetChannelEvent<HttpChannelChild> {
  public:
   StopRequestEvent(HttpChannelChild* child, const nsresult& channelStatus,
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1087,17 +1087,17 @@ void HttpChannelParent::DivertOnDataAvai
       mChannel->Cancel(rv);
     }
     mStatus = rv;
     return;
   }
 
   AutoEventEnqueuer ensureSerialDispatch(mEventQ);
 
-  rv = mParentListener->OnDataAvailable(mChannel, nullptr, stringStream, offset,
+  rv = mParentListener->OnDataAvailable(mChannel, stringStream, offset,
                                         count);
   stringStream->Close();
   if (NS_FAILED(rv)) {
     if (mChannel) {
       mChannel->Cancel(rv);
     }
     mStatus = rv;
   }
@@ -1562,17 +1562,17 @@ HttpChannelParent::OnStopRequest(nsIRequ
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // HttpChannelParent::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-HttpChannelParent::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+HttpChannelParent::OnDataAvailable(nsIRequest* aRequest,
                                    nsIInputStream* aInputStream,
                                    uint64_t aOffset, uint32_t aCount) {
   LOG(("HttpChannelParent::OnDataAvailable [this=%p aRequest=%p offset=%" PRIu64
        " count=%" PRIu32 "]\n",
        this, aRequest, aOffset, aCount));
   MOZ_ASSERT(NS_IsMainThread());
 
   MOZ_RELEASE_ASSERT(!mDivertingFromChild,
--- a/netwerk/protocol/http/HttpChannelParentListener.cpp
+++ b/netwerk/protocol/http/HttpChannelParentListener.cpp
@@ -99,26 +99,25 @@ HttpChannelParentListener::OnStopRequest
 }
 
 //-----------------------------------------------------------------------------
 // HttpChannelParentListener::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 HttpChannelParentListener::OnDataAvailable(nsIRequest* aRequest,
-                                           nsISupports* aContext,
                                            nsIInputStream* aInputStream,
                                            uint64_t aOffset, uint32_t aCount) {
   MOZ_RELEASE_ASSERT(!mSuspendedForDiversion,
                      "Cannot call OnDataAvailable if suspended for diversion!");
 
   if (!mNextListener) return NS_ERROR_UNEXPECTED;
 
   LOG(("HttpChannelParentListener::OnDataAvailable [this=%p]\n", this));
-  return mNextListener->OnDataAvailable(aRequest, aContext, aInputStream,
+  return mNextListener->OnDataAvailable(aRequest, aInputStream,
                                         aOffset, aCount);
 }
 
 //-----------------------------------------------------------------------------
 // HttpChannelParentListener::nsIInterfaceRequestor
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
--- a/netwerk/protocol/http/InterceptedHttpChannel.cpp
+++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp
@@ -1055,17 +1055,16 @@ InterceptedHttpChannel::OnStopRequest(ns
 
   ReleaseListeners();
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 InterceptedHttpChannel::OnDataAvailable(nsIRequest* aRequest,
-                                        nsISupports* aContext,
                                         nsIInputStream* aInputStream,
                                         uint64_t aOffset, uint32_t aCount) {
   // Any thread if the channel has been retargeted.
 
   if (mCanceled || !mListener) {
     // If there is no listener, we still need to drain the stream in order
     // maintain necko invariants.
     uint32_t unused = 0;
@@ -1074,17 +1073,17 @@ InterceptedHttpChannel::OnDataAvailable(
   }
   if (mProgressSink) {
     if (!(mLoadFlags & HttpBaseChannel::LOAD_BACKGROUND)) {
       mProgress = aOffset + aCount;
       MaybeCallStatusAndProgress();
     }
   }
 
-  return mListener->OnDataAvailable(this, nullptr, aInputStream, aOffset,
+  return mListener->OnDataAvailable(this, aInputStream, aOffset,
                                     aCount);
 }
 
 NS_IMETHODIMP
 InterceptedHttpChannel::MessageDiversionStarted(
     ADivertableParentChannel* aParentChannel) {
   MOZ_ASSERT(!mParentChannel);
   mParentChannel = aParentChannel;
--- a/netwerk/protocol/http/nsCORSListenerProxy.cpp
+++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp
@@ -614,34 +614,33 @@ nsCORSListenerProxy::OnStopRequest(nsIRe
   nsresult rv = listener->OnStopRequest(aRequest, aStatusCode);
   mOuterNotificationCallbacks = nullptr;
   mHttpChannel = nullptr;
   return rv;
 }
 
 NS_IMETHODIMP
 nsCORSListenerProxy::OnDataAvailable(nsIRequest* aRequest,
-                                     nsISupports* aContext,
                                      nsIInputStream* aInputStream,
                                      uint64_t aOffset, uint32_t aCount) {
   // NB: This can be called on any thread!  But we're guaranteed that it is
   // called between OnStartRequest and OnStopRequest, so we don't need to worry
   // about races.
 
   MOZ_ASSERT(mInited, "nsCORSListenerProxy has not been initialized properly");
   if (!mRequestApproved) {
     // 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->OnDataAvailable(aRequest, aContext, aInputStream, aOffset,
+  return listener->OnDataAvailable(aRequest, aInputStream, aOffset,
                                    aCount);
 }
 
 void nsCORSListenerProxy::SetInterceptController(
     nsINetworkInterceptController* aInterceptController) {
   mInterceptController = aInterceptController;
 }
 
@@ -1238,17 +1237,16 @@ nsCORSPreflightListener::OnStopRequest(n
   mCallback = nullptr;
   return NS_OK;
 }
 
 /** nsIStreamListener methods **/
 
 NS_IMETHODIMP
 nsCORSPreflightListener::OnDataAvailable(nsIRequest* aRequest,
-                                         nsISupports* ctxt,
                                          nsIInputStream* inStr,
                                          uint64_t sourceOffset,
                                          uint32_t count) {
   uint32_t totalRead;
   return inStr->ReadSegments(NS_DiscardSegment, nullptr, count, &totalRead);
 }
 
 NS_IMETHODIMP
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -8005,17 +8005,17 @@ class OnTransportStatusAsyncEvent : publ
  private:
   nsCOMPtr<nsITransportEventSink> mEventSink;
   nsresult mTransportStatus;
   int64_t mProgress;
   int64_t mProgressMax;
 };
 
 NS_IMETHODIMP
-nsHttpChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
+nsHttpChannel::OnDataAvailable(nsIRequest *request,
                                nsIInputStream *input, uint64_t offset,
                                uint32_t count) {
   nsresult rv;
   AUTO_PROFILER_LABEL("nsHttpChannel::OnDataAvailable", NETWORK);
 
   LOG(("nsHttpChannel::OnDataAvailable [this=%p request=%p offset=%" PRIu64
        " count=%" PRIu32 "]\n",
        this, request, offset, count));
@@ -8094,17 +8094,17 @@ nsHttpChannel::OnDataAvailable(nsIReques
     //
     int64_t offsetBefore = 0;
     nsCOMPtr<nsISeekableStream> seekable = do_QueryInterface(input);
     if (seekable && NS_FAILED(seekable->Tell(&offsetBefore))) {
       seekable = nullptr;
     }
 
     nsresult rv =
-        mListener->OnDataAvailable(this, nullptr, input, mLogicalOffset, count);
+        mListener->OnDataAvailable(this, input, mLogicalOffset, count);
     if (NS_SUCCEEDED(rv)) {
       // by contract mListener must read all of "count" bytes, but
       // nsInputStreamPump is tolerant to seekable streams that violate that
       // and it will redeliver incompletely read data. So we need to do
       // the same thing when updating the progress counter to stay in sync.
       int64_t offsetAfter, delta;
       if (seekable && NS_SUCCEEDED(seekable->Tell(&offsetAfter))) {
         delta = offsetAfter - offsetBefore;
--- a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
+++ b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
@@ -648,22 +648,21 @@ nsViewSourceChannel::OnStopRequest(nsIRe
   }
   return mListener->OnStopRequest(static_cast<nsIViewSourceChannel *>(this),
                                   aStatus);
 }
 
 // nsIStreamListener methods
 NS_IMETHODIMP
 nsViewSourceChannel::OnDataAvailable(nsIRequest *aRequest,
-                                     nsISupports *aContext,
                                      nsIInputStream *aInputStream,
                                      uint64_t aSourceOffset, uint32_t aLength) {
   NS_ENSURE_TRUE(mListener, NS_ERROR_FAILURE);
   return mListener->OnDataAvailable(static_cast<nsIViewSourceChannel *>(this),
-                                    aContext, aInputStream, aSourceOffset,
+                                    aInputStream, aSourceOffset,
                                     aLength);
 }
 
 // nsIHttpChannel methods
 
 // We want to forward most of nsIHttpChannel over to mHttpChannel, but we want
 // to override GetRequestHeader and VisitHeaders. The reason is that we don't
 // want various headers like Link: and Refresh: applying to view-source.
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
@@ -3999,17 +3999,17 @@ WebSocketChannel::OnOutputStreamReady(ns
 
   if (mReleaseOnTransmit) ReleaseSession();
   return NS_OK;
 }
 
 // nsIStreamListener
 
 NS_IMETHODIMP
-WebSocketChannel::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
+WebSocketChannel::OnDataAvailable(nsIRequest *aRequest,
                                   nsIInputStream *aInputStream,
                                   uint64_t aOffset, uint32_t aCount) {
   LOG(("WebSocketChannel::OnDataAvailable() %p [%p %p %p %" PRIu64 " %u]\n",
        this, aRequest, mHttpChannel.get(), aInputStream, aOffset, aCount));
 
   // This is the HTTP OnDataAvailable Method, which means this is http data in
   // response to the upgrade request and there should be no http response body
   // if the upgrade succeeded. This generally should be caught by a non 101
--- a/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
+++ b/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
@@ -229,17 +229,17 @@ void WyciwygChannelChild::OnDataAvailabl
                                       NS_ASSIGNMENT_DEPEND);
   if (NS_FAILED(rv)) {
     Cancel(rv);
     return;
   }
 
   AutoEventEnqueuer ensureSerialDispatch(mEventQ);
 
-  rv = mListener->OnDataAvailable(this, nullptr, stringStream, offset,
+  rv = mListener->OnDataAvailable(this, stringStream, offset,
                                   data.Length());
   if (NS_FAILED(rv)) Cancel(rv);
 
   if (mProgressSink && NS_SUCCEEDED(rv)) {
     mProgressSink->OnProgress(this, nullptr, offset + data.Length(),
                               mContentLength);
   }
 }
--- a/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
+++ b/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
@@ -342,17 +342,16 @@ WyciwygChannelParent::OnStopRequest(nsIR
 }
 
 //-----------------------------------------------------------------------------
 // WyciwygChannelParent::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 WyciwygChannelParent::OnDataAvailable(nsIRequest* aRequest,
-                                      nsISupports* aContext,
                                       nsIInputStream* aInputStream,
                                       uint64_t aOffset, uint32_t aCount) {
   LOG(("WyciwygChannelParent::OnDataAvailable [this=%p]\n", this));
 
   nsCString data;
   nsresult rv = NS_ReadInputStreamToString(aInputStream, data, aCount);
   if (NS_FAILED(rv)) return rv;
 
--- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
+++ b/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
@@ -540,29 +540,29 @@ nsWyciwygChannel::OnCacheEntryAvailable(
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsWyciwygChannel::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsWyciwygChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctx,
+nsWyciwygChannel::OnDataAvailable(nsIRequest *request,
                                   nsIInputStream *input, uint64_t offset,
                                   uint32_t count) {
   LOG(("nsWyciwygChannel::OnDataAvailable [this=%p request=%p offset=%" PRIu64
        " count=%u]\n",
        this, request, offset, count));
 
   nsresult rv;
 
   nsCOMPtr<nsIStreamListener> listener = mListener;
 
   if (listener) {
-    rv = listener->OnDataAvailable(this, nullptr, input, offset, count);
+    rv = listener->OnDataAvailable(this, input, offset, count);
   } else {
     MOZ_ASSERT(false, "We must have a listener!");
     rv = NS_ERROR_UNEXPECTED;
   }
 
   // XXX handle 64-bit stuff for real
   if (mProgressSink && NS_SUCCEEDED(rv)) {
     mProgressSink->OnProgress(this, nullptr, offset + count, mContentLength);
--- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
@@ -1213,17 +1213,17 @@ mozTXTToHTMLConv::Convert(nsIInputStream
 NS_IMETHODIMP
 mozTXTToHTMLConv::AsyncConvertData(const char* aFromType, const char* aToType,
                                    nsIStreamListener* aListener,
                                    nsISupports* aCtxt) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-mozTXTToHTMLConv::OnDataAvailable(nsIRequest* request, nsISupports* ctxt,
+mozTXTToHTMLConv::OnDataAvailable(nsIRequest* request,
                                   nsIInputStream* inStr, uint64_t sourceOffset,
                                   uint32_t count) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 mozTXTToHTMLConv::OnStartRequest(nsIRequest* request) {
   return NS_ERROR_NOT_IMPLEMENTED;
--- a/netwerk/streamconv/converters/nsDirIndexParser.cpp
+++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp
@@ -292,17 +292,17 @@ nsresult nsDirIndexParser::ParseData(nsI
         break;
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDirIndexParser::OnDataAvailable(nsIRequest *aRequest, nsISupports *aCtxt,
+nsDirIndexParser::OnDataAvailable(nsIRequest *aRequest,
                                   nsIInputStream *aStream,
                                   uint64_t aSourceOffset, uint32_t aCount) {
   if (aCount < 1) return NS_OK;
 
   int32_t len = mBuf.Length();
 
   // Ensure that our mBuf has capacity to hold the data we're about to
   // read.
@@ -314,17 +314,17 @@ nsDirIndexParser::OnDataAvailable(nsIReq
   rv = aStream->Read(mBuf.BeginWriting() + len, aCount, &count);
   if (NS_FAILED(rv)) return rv;
 
   // Set the string's length according to the amount of data we've read.
   // Note: we know this to work on nsCString. This isn't guaranteed to
   //       work on other strings.
   mBuf.SetLength(len + count);
 
-  return ProcessData(aRequest, aCtxt);
+  return ProcessData(aRequest, nullptr);
 }
 
 nsresult nsDirIndexParser::ProcessData(nsIRequest *aRequest,
                                        nsISupports *aCtxt) {
   if (!mListener) return NS_ERROR_FAILURE;
 
   int32_t numItems = 0;
 
--- a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp
+++ b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp
@@ -67,17 +67,17 @@ nsFTPDirListingConv::AsyncConvertData(co
           ("nsFTPDirListingConv::AsyncConvertData() converting FROM raw, TO "
            "application/http-index-format\n"));
 
   return NS_OK;
 }
 
 // nsIStreamListener implementation
 NS_IMETHODIMP
-nsFTPDirListingConv::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
+nsFTPDirListingConv::OnDataAvailable(nsIRequest *request,
                                      nsIInputStream *inStr,
                                      uint64_t sourceOffset, uint32_t count) {
   NS_ASSERTION(request, "FTP dir listing stream converter needs a request");
 
   nsresult rv;
 
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -94,19 +94,19 @@ nsFTPDirListingConv::OnDataAvailable(nsI
 
   rv = inStr->Read(buffer.get(), streamLen, &read);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // the dir listings are ascii text, null terminate this sucker.
   buffer[streamLen] = '\0';
 
   MOZ_LOG(gFTPDirListConvLog, LogLevel::Debug,
-          ("nsFTPDirListingConv::OnData(request = %p, ctxt = %p, inStr = %p, "
+          ("nsFTPDirListingConv::OnData(request = %p, inStr = %p, "
            "sourceOffset = %" PRIu64 ", count = %u)\n",
-           request, ctxt, inStr, sourceOffset, count));
+           request, inStr, sourceOffset, count));
 
   if (!mBuffer.IsEmpty()) {
     // we have data left over from a previous OnDataAvailable() call.
     // combine the buffers so we don't lose any data.
     mBuffer.Append(buffer.get());
 
     buffer = MakeUniqueFallible<char[]>(mBuffer.Length() + 1);
     NS_ENSURE_TRUE(buffer, NS_ERROR_OUT_OF_MEMORY);
@@ -148,17 +148,17 @@ nsFTPDirListingConv::OnDataAvailable(nsI
   }
 
   // send the converted data out.
   nsCOMPtr<nsIInputStream> inputData;
 
   rv = NS_NewCStringInputStream(getter_AddRefs(inputData), indexFormat);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = mFinalListener->OnDataAvailable(request, ctxt, inputData, 0,
+  rv = mFinalListener->OnDataAvailable(request, inputData, 0,
                                        indexFormat.Length());
 
   return rv;
 }
 
 // nsIRequestObserver implementation
 NS_IMETHODIMP
 nsFTPDirListingConv::OnStartRequest(nsIRequest *request) {
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
@@ -250,17 +250,17 @@ nsHTTPCompressConv::OnStopRequest(nsIReq
     MOZ_ASSERT(res == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT);
   } while (res == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT);
 
   self->mBrotli->mStatus = NS_ERROR_UNEXPECTED;
   return self->mBrotli->mStatus;
 }
 
 NS_IMETHODIMP
-nsHTTPCompressConv::OnDataAvailable(nsIRequest *request, nsISupports *aContext,
+nsHTTPCompressConv::OnDataAvailable(nsIRequest *request,
                                     nsIInputStream *iStr,
                                     uint64_t aSourceOffset, uint32_t aCount) {
   nsresult rv = NS_ERROR_INVALID_CONTENT_ENCODING;
   uint32_t streamLen = aCount;
   LOG(("nsHttpCompressConv %p OnDataAvailable %d", this, aCount));
 
   if (streamLen == 0) {
     NS_ERROR("count of zero passed to OnDataAvailable");
@@ -344,37 +344,37 @@ nsHTTPCompressConv::OnDataAvailable(nsIR
           d_stream.next_out = mOutBuffer;
           d_stream.avail_out = (uInt)mOutBufferLen;
 
           int code = inflate(&d_stream, Z_NO_FLUSH);
           unsigned bytesWritten = (uInt)mOutBufferLen - d_stream.avail_out;
 
           if (code == Z_STREAM_END) {
             if (bytesWritten) {
-              rv = do_OnDataAvailable(request, aContext, aSourceOffset,
+              rv = do_OnDataAvailable(request, nullptr, aSourceOffset,
                                       (char *)mOutBuffer, bytesWritten);
               if (NS_FAILED(rv)) {
                 return rv;
               }
             }
 
             inflateEnd(&d_stream);
             mStreamEnded = true;
             break;
           } else if (code == Z_OK) {
             if (bytesWritten) {
-              rv = do_OnDataAvailable(request, aContext, aSourceOffset,
+              rv = do_OnDataAvailable(request, nullptr, aSourceOffset,
                                       (char *)mOutBuffer, bytesWritten);
               if (NS_FAILED(rv)) {
                 return rv;
               }
             }
           } else if (code == Z_BUF_ERROR) {
             if (bytesWritten) {
-              rv = do_OnDataAvailable(request, aContext, aSourceOffset,
+              rv = do_OnDataAvailable(request, nullptr, aSourceOffset,
                                       (char *)mOutBuffer, bytesWritten);
               if (NS_FAILED(rv)) {
                 return rv;
               }
             }
             break;
           } else if (code == Z_DATA_ERROR) {
             // some servers (notably Apache with mod_deflate) don't generate
@@ -426,37 +426,37 @@ nsHTTPCompressConv::OnDataAvailable(nsIR
           d_stream.next_out = mOutBuffer;
           d_stream.avail_out = (uInt)mOutBufferLen;
 
           int code = inflate(&d_stream, Z_NO_FLUSH);
           unsigned bytesWritten = (uInt)mOutBufferLen - d_stream.avail_out;
 
           if (code == Z_STREAM_END) {
             if (bytesWritten) {
-              rv = do_OnDataAvailable(request, aContext, aSourceOffset,
+              rv = do_OnDataAvailable(request, nullptr, aSourceOffset,
                                       (char *)mOutBuffer, bytesWritten);
               if (NS_FAILED(rv)) {
                 return rv;
               }
             }
 
             inflateEnd(&d_stream);
             mStreamEnded = true;
             break;
           } else if (code == Z_OK) {
             if (bytesWritten) {
-              rv = do_OnDataAvailable(request, aContext, aSourceOffset,
+              rv = do_OnDataAvailable(request, nullptr, aSourceOffset,
                                       (char *)mOutBuffer, bytesWritten);
               if (NS_FAILED(rv)) {
                 return rv;
               }
             }
           } else if (code == Z_BUF_ERROR) {
             if (bytesWritten) {
-              rv = do_OnDataAvailable(request, aContext, aSourceOffset,
+              rv = do_OnDataAvailable(request, nullptr, aSourceOffset,
                                       (char *)mOutBuffer, bytesWritten);
               if (NS_FAILED(rv)) {
                 return rv;
               }
             }
             break;
           } else {
             return NS_ERROR_INVALID_CONTENT_ENCODING;
@@ -466,17 +466,17 @@ nsHTTPCompressConv::OnDataAvailable(nsIR
       break;
 
     case HTTP_COMPRESS_BROTLI: {
       if (!mBrotli) {
         mBrotli = new BrotliWrapper();
       }
 
       mBrotli->mRequest = request;
-      mBrotli->mContext = aContext;
+      mBrotli->mContext = nullptr;
       mBrotli->mSourceOffset = aSourceOffset;
 
       uint32_t countRead;
       rv = iStr->ReadSegments(BrotliHandler, this, streamLen, &countRead);
       if (NS_SUCCEEDED(rv)) {
         rv = mBrotli->mStatus;
       }
       if (NS_FAILED(rv)) {
@@ -485,17 +485,17 @@ nsHTTPCompressConv::OnDataAvailable(nsIR
     } break;
 
     default:
       nsCOMPtr<nsIStreamListener> listener;
       {
         MutexAutoLock lock(mMutex);
         listener = mListener;
       }
-      rv = listener->OnDataAvailable(request, aContext, iStr, aSourceOffset,
+      rv = listener->OnDataAvailable(request, iStr, aSourceOffset,
                                      aCount);
       if (NS_FAILED(rv)) {
         return rv;
       }
   } /* switch */
 
   return NS_OK;
 } /* OnDataAvailable */
@@ -522,17 +522,17 @@ nsresult nsHTTPCompressConv::do_OnDataAv
   mStream->ShareData(buffer, count);
 
   nsCOMPtr<nsIStreamListener> listener;
   {
     MutexAutoLock lock(mMutex);
     listener = mListener;
   }
   nsresult rv =
-      listener->OnDataAvailable(request, context, mStream, offset, count);
+      listener->OnDataAvailable(request, mStream, offset, count);
 
   // Make sure the stream no longer references |buffer| in case our listener
   // is crazy enough to try to read from |mStream| after ODA.
   mStream->ShareData("", 0);
   mDecodedDataLength += count;
 
   return rv;
 }
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -657,25 +657,25 @@ nsIndexedToHTML::OnStopRequest(nsIReques
 }
 
 nsresult nsIndexedToHTML::SendToListener(nsIRequest* aRequest,
                                          nsISupports* aContext,
                                          const nsACString& aBuffer) {
   nsCOMPtr<nsIInputStream> inputData;
   nsresult rv = NS_NewCStringInputStream(getter_AddRefs(inputData), aBuffer);
   NS_ENSURE_SUCCESS(rv, rv);
-  return mListener->OnDataAvailable(aRequest, aContext, inputData, 0,
+  return mListener->OnDataAvailable(aRequest, inputData, 0,
                                     aBuffer.Length());
 }
 
 NS_IMETHODIMP
-nsIndexedToHTML::OnDataAvailable(nsIRequest* aRequest, nsISupports* aCtxt,
+nsIndexedToHTML::OnDataAvailable(nsIRequest* aRequest,
                                  nsIInputStream* aInput, uint64_t aOffset,
                                  uint32_t aCount) {
-  return mParser->OnDataAvailable(aRequest, aCtxt, aInput, aOffset, aCount);
+  return mParser->OnDataAvailable(aRequest, aInput, aOffset, aCount);
 }
 
 NS_IMETHODIMP
 nsIndexedToHTML::OnIndexAvailable(nsIRequest* aRequest, nsISupports* aCtxt,
                                   nsIDirIndex* aIndex) {
   nsresult rv;
   if (!aIndex) return NS_ERROR_NULL_POINTER;
 
--- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp
+++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp
@@ -50,17 +50,17 @@ void nsPartChannel::InitializeByteRange(
 
 nsresult nsPartChannel::SendOnStartRequest(nsISupports *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);
+  return mListener->OnDataAvailable(this, aStream, aOffset, aLen);
 }
 
 nsresult nsPartChannel::SendOnStopRequest(nsISupports *aContext,
                                           nsresult aStatus) {
   // Drop the listener
   nsCOMPtr<nsIStreamListener> listener;
   listener.swap(mListener);
   return listener->OnStopRequest(this, aStatus);
@@ -489,17 +489,17 @@ nsMultiMixedConv::OnStartRequest(nsIRequ
   mBoundaryTokenWithDashes = mTokenizer.AddCustomToken(
       NS_LITERAL_CSTRING("--") + mBoundary, mTokenizer.CASE_SENSITIVE);
 
   return NS_OK;
 }
 
 // nsIStreamListener implementation
 NS_IMETHODIMP
-nsMultiMixedConv::OnDataAvailable(nsIRequest *request, nsISupports *context,
+nsMultiMixedConv::OnDataAvailable(nsIRequest *request,
                                   nsIInputStream *inStr, uint64_t sourceOffset,
                                   uint32_t count) {
   // Failing these assertions may indicate that some of the target listeners of
   // this converter is looping the thead queue, which is harmful to how we
   // collect the raw (content) data.
   MOZ_DIAGNOSTIC_ASSERT(!mInOnDataAvailable,
                         "nsMultiMixedConv::OnDataAvailable reentered!");
   MOZ_DIAGNOSTIC_ASSERT(
--- a/netwerk/streamconv/converters/nsUnknownDecoder.cpp
+++ b/netwerk/streamconv/converters/nsUnknownDecoder.cpp
@@ -49,17 +49,17 @@ nsresult nsUnknownDecoder::ConvertedStre
 NS_IMETHODIMP
 nsUnknownDecoder::ConvertedStreamListener::OnStartRequest(
     nsIRequest* request) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsUnknownDecoder::ConvertedStreamListener::OnDataAvailable(
-    nsIRequest* request, nsISupports* context, nsIInputStream* stream,
+    nsIRequest* request, nsIInputStream* stream,
     uint64_t offset, uint32_t count) {
   uint32_t read;
   nsAutoCString decodedData;
   {
     MutexAutoLock lock(mDecoder->mMutex);
     decodedData = mDecoder->mDecodedData;
   }
   nsresult rv =
@@ -147,17 +147,17 @@ nsUnknownDecoder::AsyncConvertData(const
 
 // ----
 //
 // nsIStreamListener methods...
 //
 // ----
 
 NS_IMETHODIMP
-nsUnknownDecoder::OnDataAvailable(nsIRequest* request, nsISupports* aCtxt,
+nsUnknownDecoder::OnDataAvailable(nsIRequest* request,
                                   nsIInputStream* aStream,
                                   uint64_t aSourceOffset, uint32_t aCount) {
   nsresult rv = NS_OK;
 
   bool contentTypeEmpty;
   {
     MutexAutoLock lock(mMutex);
     if (!mNextListener) return NS_ERROR_FAILURE;
@@ -193,17 +193,17 @@ nsUnknownDecoder::OnDataAvailable(nsIReq
       // Adjust the source offset...  The call to FireListenerNotifications(...)
       // will make the first OnDataAvailable(...) call with an offset of 0.
       // So, this offset needs to be adjusted to reflect that...
       //
       aSourceOffset += mBufferLen;
 
       DetermineContentType(request);
 
-      rv = FireListenerNotifications(request, aCtxt);
+      rv = FireListenerNotifications(request, nullptr);
     }
   }
 
   // Must not fire ODA again if it failed once
   if (aCount && NS_SUCCEEDED(rv)) {
 #ifdef DEBUG
     {
       MutexAutoLock lock(mMutex);
@@ -222,17 +222,17 @@ nsUnknownDecoder::OnDataAvailable(nsIReq
       }
     }
 
     nsCOMPtr<nsIStreamListener> listener;
     {
       MutexAutoLock lock(mMutex);
       listener = mNextListener;
     }
-    rv = listener->OnDataAvailable(request, aCtxt, aStream, aSourceOffset,
+    rv = listener->OnDataAvailable(request, aStream, aSourceOffset,
                                    aCount);
   }
 
   return rv;
 }
 
 // ----
 //
@@ -744,17 +744,17 @@ nsresult nsUnknownDecoder::FireListenerN
     // Create a pipe and fill it with the data from the sniffer buffer.
     rv = NS_NewPipe(getter_AddRefs(in), getter_AddRefs(out), MAX_BUFFER_SIZE,
                     MAX_BUFFER_SIZE);
 
     if (NS_SUCCEEDED(rv)) {
       rv = out->Write(mBuffer, mBufferLen, &len);
       if (NS_SUCCEEDED(rv)) {
         if (len == mBufferLen) {
-          rv = listener->OnDataAvailable(request, aCtxt, in, 0, len);
+          rv = listener->OnDataAvailable(request, in, 0, len);
         } else {
           NS_ERROR("Unable to write all the data into the pipe.");
           rv = NS_ERROR_FAILURE;
         }
       }
     }
   }
 
@@ -793,17 +793,17 @@ nsresult nsUnknownDecoder::ConvertEncode
       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);
 
-        rv = listener->OnDataAvailable(request, nullptr, rawStream, 0, length);
+        rv = listener->OnDataAvailable(request, rawStream, 0, length);
         NS_ENSURE_SUCCESS(rv, rv);
       }
 
       listener->OnStopRequest(request, NS_OK);
     }
   }
   return rv;
 }
--- a/netwerk/test/browser/browser_nsIFormPOSTActionChannel.js
+++ b/netwerk/test/browser/browser_nsIFormPOSTActionChannel.js
@@ -171,17 +171,17 @@ document.getElementById('form').submit()
     stream.setData(data, data.length);
 
     var runnable = {
       run: () => {
         try {
           aListener.onStartRequest(this, null);
         } catch(e) {}
         try {
-          aListener.onDataAvailable(this, null, stream, 0, stream.available());
+          aListener.onDataAvailable(this, stream, 0, stream.available());
         } catch(e) {}
         try {
           aListener.onStopRequest(this, null, Cr.NS_OK);
         } catch(e) {}
       }
     };
     Services.tm.dispatchToMainThread(runnable);
   },
--- a/netwerk/test/httpserver/test/head_utils.js
+++ b/netwerk/test/httpserver/test/head_utils.js
@@ -287,17 +287,17 @@ function runHttpTests(testArray, done) {
           } catch (e) {
             do_report_unexpected_exception(e, "testArray[" + testIndex + "].onStartRequest");
           }
         } catch (e) {
           do_note_exception(e, "!!! swallowing onStartRequest exception so onStopRequest is " +
                 "called...");
         }
       },
-      onDataAvailable(request, cx, inputStream, offset, count) {
+      onDataAvailable(request, inputStream, offset, count) {
         var quantum = 262144; // just above half the argument-count limit
         var bis = makeBIS(inputStream);
         for (var start = 0; start < count; start += quantum) {
           var newData = bis.readByteArray(Math.min(quantum, count - start));
           Array.prototype.push.apply(this._data, newData);
         }
       },
       onStopRequest(request, status) {
--- a/netwerk/test/httpserver/test/test_sjs_object_state.js
+++ b/netwerk/test/httpserver/test/test_sjs_object_state.js
@@ -233,17 +233,17 @@ HTTPTestLoader.prototype =
         } catch (e) {
           do_throw(this._path + ": error in onStartRequest: " + e);
         }
       } catch (e) {
         dumpn("!!! swallowing onStartRequest exception so onStopRequest is " +
               "called...");
       }
     },
-    onDataAvailable(request, cx, inputStream, offset, count) {
+    onDataAvailable(request, inputStream, offset, count) {
       dumpn("*** HTTPTestLoader.onDataAvailable for " + this._path);
 
       Array.prototype.push.apply(this._data,
                                  makeBIS(inputStream).readByteArray(count));
     },
     onStopRequest(request, status) {
       dumpn("*** HTTPTestLoader.onStopRequest for " + this._path);
 
--- a/netwerk/test/unit/head_cache2.js
+++ b/netwerk/test/unit/head_cache2.js
@@ -52,17 +52,17 @@ function pumpReadStream(inputStream, goo
   if (inputStream.isNonBlocking()) {
     // non-blocking stream, must read via pump
     var pump = Cc["@mozilla.org/network/input-stream-pump;1"]
                .createInstance(Ci.nsIInputStreamPump);
     pump.init(inputStream, 0, 0, true);
     var data = "";
     pump.asyncRead({
       onStartRequest: function (aRequest) { },
-      onDataAvailable: function (aRequest, aContext, aInputStream, aOffset, aCount)
+      onDataAvailable: function (aRequest, aInputStream, aOffset, aCount)
       {
         var wrapper = Cc["@mozilla.org/scriptableinputstream;1"].
                       createInstance(Ci.nsIScriptableInputStream);
         wrapper.init(aInputStream);
         var str = wrapper.read(wrapper.available());
         LOG_C2("reading data '" + str.substring(0,5) + "'");
         data += str;
       },
--- a/netwerk/test/unit/head_channels.js
+++ b/netwerk/test/unit/head_channels.js
@@ -124,17 +124,17 @@ ChannelListener.prototype = {
         request.suspend();
         do_timeout(SUSPEND_DELAY, function() { request.resume(); });
       }
     } catch (ex) {
       do_throw("Error in onStartRequest: " + ex);
     }
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     try {
       let current = Date.now();
 
       if (!this._got_onstartrequest)
         do_throw("onDataAvailable without onStartRequest event!");
       if (this._got_onstoprequest)
         do_throw("onDataAvailable after onStopRequest event!");
       if (!request.isPending())
--- a/netwerk/test/unit/test_alt-data_stream.js
+++ b/netwerk/test/unit/test_alt-data_stream.js
@@ -94,17 +94,17 @@ function openAltChannel()
   cc.preferAlternativeDataType(altContentType, "", true);
 
   chan.asyncOpen(altDataListener);
 }
 
 var altDataListener = {
   buffer: "",
   onStartRequest: function(request) { },
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     let string = NetUtil.readInputStreamToString(stream, count);
     this.buffer += string;
 
     // XXX: this condition might be a bit volatile. If this test times out,
     // it probably means that for some reason, the listener didn't get all the
     // data in the first chunk.
     if (this.buffer.length == firstChunkSize) {
       // write the rest of the content
@@ -128,17 +128,17 @@ function openAltChannelWithOriginalConte
   cc.preferAlternativeDataType(altContentType, "", false);
 
   chan.asyncOpen(originalListener);
 }
 
 var originalListener = {
   buffer: "",
   onStartRequest: function(request) { },
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     let string = NetUtil.readInputStreamToString(stream, count);
     this.buffer += string;
   },
   onStopRequest: function(request, status) {
     var cc = request.QueryInterface(Ci.nsICacheInfoChannel);
     Assert.equal(cc.alternativeDataType, altContentType);
     Assert.equal(this.buffer.length, responseContent.length);
     Assert.equal(this.buffer, responseContent);
--- a/netwerk/test/unit/test_altsvc.js
+++ b/netwerk/test/unit/test_altsvc.js
@@ -157,17 +157,17 @@ Listener.prototype = {
         do_throw("Channel should have a success code! (" + request.status + ")");
       }
       Assert.equal(request.responseStatus, 200);
     } else {
       Assert.equal(Components.isSuccessCode(request.status), false);
     }
   },
 
-  onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
+  onDataAvailable: function testOnDataAvailable(request, stream, off, cnt) {
     read_stream(stream, cnt);
   },
 
   onStopRequest: function testOnStopRequest(request, status) {
     var routed = "";
     try {
       routed = request.getRequestHeader("Alt-Used");
     } catch (e) {}
--- a/netwerk/test/unit/test_anonymous-coalescing.js
+++ b/netwerk/test/unit/test_anonymous-coalescing.js
@@ -85,17 +85,17 @@ Listener.prototype = {
 
     if (!Components.isSuccessCode(request.status)) {
       do_throw("Channel should have a success code! (" + request.status + ")");
     }
     Assert.equal(request.responseStatus, 200);
     this.clientPort = parseInt(request.getResponseHeader("x-client-port"));
   },
 
-  onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
+  onDataAvailable: function testOnDataAvailable(request, stream, off, cnt) {
     read_stream(stream, cnt);
   },
 
   onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(Components.isSuccessCode(status));
     if (nextPortExpectedToBeSame) {
      Assert.equal(currentPort, this.clientPort);
     } else {
--- a/netwerk/test/unit/test_auth_dialog_permission.js
+++ b/netwerk/test/unit/test_auth_dialog_permission.js
@@ -162,17 +162,17 @@ Test.prototype = {
 
     } catch (e) {
       do_throw("Unexpected exception: " + e);
     }
 
     throw Cr.NS_ERROR_ABORT;
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     do_throw("Should not get any data!");
   },
 
   onStopRequest: function(request, status) {
     Assert.equal(status, Cr.NS_ERROR_ABORT);
 
     // Clear the auth cache.
     Cc["@mozilla.org/network/http-auth-manager;1"]
--- a/netwerk/test/unit/test_backgroundfilesaver.js
+++ b/netwerk/test/unit/test_backgroundfilesaver.js
@@ -214,21 +214,21 @@ function promisePumpToSaver(aSourceStrin
       {
         aSaverStreamListener.onStopRequest(aRequest, aStatusCode);
         if (Components.isSuccessCode(aStatusCode)) {
           resolve();
         } else {
           reject(new Components.Exception(aResult));
         }
       },
-      onDataAvailable: function PPTS_onDataAvailable(aRequest, aContext,
+      onDataAvailable: function PPTS_onDataAvailable(aRequest,
                                                      aInputStream, aOffset,
                                                      aCount)
       {
-        aSaverStreamListener.onDataAvailable(aRequest, aContext, aInputStream,
+        aSaverStreamListener.onDataAvailable(aRequest, aInputStream,
                                              aOffset, aCount);
       },
     }, null);
   });
 }
 
 var gStillRunning = true;
 
--- a/netwerk/test/unit/test_bug1218029.js
+++ b/netwerk/test/unit/test_bug1218029.js
@@ -66,17 +66,17 @@ function execute_test(test) {
 
   let listener = Cc["@mozilla.org/network/incremental-stream-loader;1"]
                  .createInstance(Ci.nsIIncrementalStreamLoader);
   listener.init(observer);
 
   listener.onStartRequest(channel);
   var offset = 0;
   test.chunks.forEach(function (chunkLength) {
-    listener.onDataAvailable(channel, null, stream, offset, chunkLength);
+    listener.onDataAvailable(channel, stream, offset, chunkLength);
     offset += chunkLength;
   });
   listener.onStopRequest(channel, test.status);
 }
 
 function run_test() {
   tests.forEach(execute_test);
 }
--- a/netwerk/test/unit/test_bug1279246.js
+++ b/netwerk/test/unit/test_bug1279246.js
@@ -28,17 +28,17 @@ Listener.prototype = {
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
   onStartRequest: function(request) {
     Assert.equal(request.status, Cr.NS_OK);
     this._buffer = "";
   },
 
-  onDataAvailable: function(request, cx, stream, offset, cnt) {
+  onDataAvailable: function(request, stream, offset, cnt) {
     if (pass == 0) {
       this._buffer = this._buffer.concat(read_stream(stream, cnt));
     } else {
       request.QueryInterface(Ci.nsICachingChannel);
       if (!request.isFromCache()) {
         do_throw("Response is not from the cache");
       }
 
--- a/netwerk/test/unit/test_bug1312774_http1.js
+++ b/netwerk/test/unit/test_bug1312774_http1.js
@@ -87,17 +87,17 @@ function HttpResponseListener(id)
 };
 
 var testOrder = 0;
 HttpResponseListener.prototype =
 {
   onStartRequest: function (request) {
   },
 
-  onDataAvailable: function (request, ctx, stream, off, cnt) {
+  onDataAvailable: function (request, stream, off, cnt) {
   },
 
   onStopRequest: function (request, status) {
     log("STOP id=" + this.id);
     do_test_finished();
   }
 };
 
--- a/netwerk/test/unit/test_bug1312782_http1.js
+++ b/netwerk/test/unit/test_bug1312782_http1.js
@@ -93,17 +93,17 @@ function HttpResponseListener(id)
   this.id = id
 };
 
 HttpResponseListener.prototype =
 {
   onStartRequest: function (request) {
   },
 
-  onDataAvailable: function (request, ctx, stream, off, cnt) {
+  onDataAvailable: function (request, stream, off, cnt) {
   },
 
   onStopRequest: function (request, status) {
     log("STOP id=" + this.id);
     do_test_finished();
   }
 };
 
--- a/netwerk/test/unit/test_bug1355539_http1.js
+++ b/netwerk/test/unit/test_bug1355539_http1.js
@@ -105,17 +105,17 @@ function HttpResponseListener(id, onStop
   this.stopCallback = onStopCallback;
 };
 
 HttpResponseListener.prototype =
 {
   onStartRequest: function (request) {
   },
 
-  onDataAvailable: function (request, ctx, stream, off, cnt) {
+  onDataAvailable: function (request, stream, off, cnt) {
   },
 
   onStopRequest: function (request, status) {
     log("STOP id=" + this.id);
     do_test_finished();
     if (this.stopCallback) {
       this.stopCallback();
     }
--- a/netwerk/test/unit/test_bug1378385_http1.js
+++ b/netwerk/test/unit/test_bug1378385_http1.js
@@ -101,17 +101,17 @@ function HttpResponseListener(id)
   this.id = id
 }
 
 HttpResponseListener.prototype =
 {
   onStartRequest: function (request) {
   },
 
-  onDataAvailable: function (request, ctx, stream, off, cnt) {
+  onDataAvailable: function (request, stream, off, cnt) {
   },
 
   onStopRequest: function (request, status) {
     log("STOP id=" + this.id);
     do_test_finished();
   }
 };
 
--- a/netwerk/test/unit/test_bug1411316_http1.js
+++ b/netwerk/test/unit/test_bug1411316_http1.js
@@ -66,17 +66,17 @@ function HttpResponseListener(id, onStop
   this.onStopRequestStatus = onStopRequestStatus;
 };
 
 HttpResponseListener.prototype =
 {
   onStartRequest: function (request) {
   },
 
-  onDataAvailable: function (request, ctx, stream, off, cnt) {
+  onDataAvailable: function (request, stream, off, cnt) {
   },
 
   onStopRequest: function (request, status) {
     log("STOP id=" + this.id + " status=" + status);
     Assert.ok(this.onStopRequestStatus == status);
     do_test_finished();
   }
 };
--- a/netwerk/test/unit/test_bug282432.js
+++ b/netwerk/test/unit/test_bug282432.js
@@ -17,17 +17,17 @@ function run_test() {
     onStartRequest: function(aRequest) {},
 
     onStopRequest: function(aRequest, aStatusCode) {
       // Make sure we can catch the error NS_ERROR_FILE_NOT_FOUND here.
       Assert.equal(aStatusCode, Cr.NS_ERROR_FILE_NOT_FOUND);
       do_test_finished();
     },
 
-    onDataAvailable: function(aRequest, aContext, aStream, aOffset, aCount) {
+    onDataAvailable: function(aRequest, aStream, aOffset, aCount) {
       do_throw("The channel must not call onDataAvailable().");
     }
   };
 
   let listener = new StreamListener();
   let ios = Cc["@mozilla.org/network/io-service;1"]
               .getService(Ci.nsIIOService);
 
--- a/netwerk/test/unit/test_bug365133.js
+++ b/netwerk/test/unit/test_bug365133.js
@@ -84,17 +84,17 @@ function storeData() {
     pending: true,
     isPending: function() {
       return this.pending;
     },
     QueryInterface: ChromeUtils.generateQI([Ci.nsIChannel])
   };
 
   converter.onStartRequest(channel, null);
-  converter.onDataAvailable(channel, null, stream, 0, 0);
+  converter.onDataAvailable(channel, stream, 0, 0);
   channel.pending = false;
   converter.onStopRequest(channel, null, Cr.NS_OK);
 }
 
 function next_test() {
   if (tests.length == 0)
     do_test_finished();
   else {
--- a/netwerk/test/unit/test_bug455311.js
+++ b/netwerk/test/unit/test_bug455311.js
@@ -68,17 +68,17 @@ RequestObserver.prototype = {
   onStartRequest: function (req)
   {
     var chan = req.QueryInterface(Ci.nsIChannel);
     Assert.equal(chan.URI.spec, this._origURI.spec);
     Assert.equal(chan.URI, this._origURI);
     Assert.equal(chan.originalURI.spec, this._origURI.spec);
     Assert.equal(chan.originalURI, this._origURI);
   },
-  onDataAvailable: function(req, ctx, stream, offset, count)
+  onDataAvailable: function(req, stream, offset, count)
   {
     do_throw("Unexpected call to onDataAvailable");
   },
   onStopRequest: function (req, status)
   {
     var chan = req.QueryInterface(Ci.nsIChannel);
     try {
       Assert.equal(chan.URI.spec, this._origURI.spec);
--- a/netwerk/test/unit/test_bug482601.js
+++ b/netwerk/test/unit/test_bug482601.js
@@ -23,17 +23,17 @@ var observer = {
   }
 };
 
 var listener = {
   onStartRequest: function (request) {
     buffer = "";
   },
 
-  onDataAvailable: function (request, ctx, stream, offset, count) {
+  onDataAvailable: function (request, stream, offset, count) {
     buffer = buffer.concat(read_stream(stream, count));
   },
 
   onStopRequest: function (request, status) {
     Assert.equal(status, Cr.NS_OK);
     Assert.equal(buffer, "0123456789");
     Assert.equal(observers_called, results[test_nr]);
     test_nr++;
--- a/netwerk/test/unit/test_bug484684.js
+++ b/netwerk/test/unit/test_bug484684.js
@@ -88,17 +88,17 @@ function storeData(status, entry) {
     pending: true,
     isPending: function() {
       return this.pending;
     },
     QueryInterface: ChromeUtils.generateQI([Ci.nsIChannel])
   };
 
   converter.onStartRequest(channel, null);
-  converter.onDataAvailable(channel, null, stream, 0, 0);
+  converter.onDataAvailable(channel, stream, 0, 0);
   channel.pending = false;
   converter.onStopRequest(channel, null, Cr.NS_OK);
 }
 
 function next_test() {
   if (tests.length == 0)
     do_test_finished();
   else {
--- a/netwerk/test/unit/test_bug515583.js
+++ b/netwerk/test/unit/test_bug515583.js
@@ -46,17 +46,17 @@ function storeData(status, entry) {
     pending: true,
     isPending: function() {
       return this.pending;
     },
     QueryInterface: ChromeUtils.generateQI([Ci.nsIChannel])
   };
 
   converter.onStartRequest(channel, null);
-  converter.onDataAvailable(channel, null, stream, 0, 0);
+  converter.onDataAvailable(channel, stream, 0, 0);
   channel.pending = false;
   converter.onStopRequest(channel, null, Cr.NS_OK);
 }
 
 function next_test() {
   if (tests.length == 0)
     do_test_finished();
   else {
--- a/netwerk/test/unit/test_bug536324_64bit_content_length.js
+++ b/netwerk/test/unit/test_bug536324_64bit_content_length.js
@@ -9,17 +9,17 @@ const {NetUtil} = ChromeUtils.import("re
 const CONTENT_LENGTH = "1152921504606846975";
 
 var httpServer = null;
 
 var listener = {
   onStartRequest: function (req) {
   },
 
-  onDataAvailable: function (req, ctx, stream, off, count) {
+  onDataAvailable: function (req, stream, off, count) {
     Assert.equal(req.getResponseHeader("Content-Length"), CONTENT_LENGTH);
 
     // We're done here, cancel the channel
     req.cancel(NS_BINDING_ABORT);
   },
 
   onStopRequest: function (req, stat) {
     httpServer.stop(do_test_finished);
--- a/netwerk/test/unit/test_bug543805.js
+++ b/netwerk/test/unit/test_bug543805.js
@@ -66,17 +66,17 @@ function storeData(status, entry) {
     pending: true,
     isPending: function() {
       return this.pending;
     },
     QueryInterface: ChromeUtils.generateQI([Ci.nsIChannel])
   };
 
   converter.onStartRequest(channel, null);
-  converter.onDataAvailable(channel, null, stream, 0, 0);
+  converter.onDataAvailable(channel, stream, 0, 0);
   channel.pending = false;
   converter.onStopRequest(channel, null, Cr.NS_OK);
 }
 
 function next_test() {
   if (tests.length == 0)
     do_test_finished();
   else {
--- a/netwerk/test/unit/test_bug561042.js
+++ b/netwerk/test/unit/test_bug561042.js
@@ -14,17 +14,17 @@ var cookie = "";
 for (let i =0; i < 10000; i++) {
     cookie += " big cookie";
 }
 
 var listener = {
   onStartRequest: function (request) {
   },
 
-  onDataAvailable: function (request, ctx, stream) {
+  onDataAvailable: function (request, stream) {
   },
 
   onStopRequest: function (request, status) {
       Assert.equal(status, Cr.NS_OK);
       server.stop(do_test_finished);
   },
 
 };
--- a/netwerk/test/unit/test_bug596443.js
+++ b/netwerk/test/unit/test_bug596443.js
@@ -32,17 +32,17 @@ Listener.prototype = {
             iid.equals(Ci.nsISupports))
           return this;
         throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
     onStartRequest: function (request) {
         this._buffer = "";
     },
-    onDataAvailable: function (request, ctx, stream, offset, count) {
+    onDataAvailable: function (request, stream, offset, count) {
         this._buffer = this._buffer.concat(read_stream(stream, count));
     },
     onStopRequest: function (request, status) {
         Assert.equal(this._buffer, this._response);
         if (--expectedOnStopRequests == 0)
             do_timeout(10, function() {
                         httpserver.stop(do_test_finished);
                     });
--- a/netwerk/test/unit/test_bug633743.js
+++ b/netwerk/test/unit/test_bug633743.js
@@ -36,17 +36,17 @@ Test.prototype = {
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
   onStartRequest: function(request) { },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     this._buffer = this._buffer.concat(read_stream(stream, count));
   },
 
   onStopRequest: function(request, status) {
     Assert.equal(this._buffer, this._expectVal);
     do_timeout(0, run_next_test);
   },
 
--- a/netwerk/test/unit/test_bug667907.js
+++ b/netwerk/test/unit/test_bug667907.js
@@ -28,17 +28,17 @@ var listener_proto = {
   },
 
   onStartRequest: function(request) {
     Assert.equal(request.QueryInterface(Ci.nsIChannel).contentType,
 		this.contentType);
     request.cancel(Cr.NS_BINDING_ABORTED);
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     do_throw("Unexpected onDataAvailable");
   },
 
   onStopRequest: function(request, status) {
     Assert.equal(status, Cr.NS_BINDING_ABORTED);
     this.termination_func();
   }  
 };
--- a/netwerk/test/unit/test_cacheflags.js
+++ b/netwerk/test/unit/test_cacheflags.js
@@ -65,17 +65,17 @@ Test.prototype = {
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
   onStartRequest: function(request) {
     var cachingChannel = request.QueryInterface(Ci.nsICacheInfoChannel);
     this._isFromCache = request.isPending() && cachingChannel.isFromCache();
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     this._buffer = this._buffer.concat(read_stream(stream, count));
   },
 
   onStopRequest: function(request, status) {
     Assert.equal(Components.isSuccessCode(status), this.expectSuccess);
     Assert.equal(this._isFromCache, this.readFromCache);
     Assert.equal(gHitServer, this.hitServer);
 
--- a/netwerk/test/unit/test_content_length_underrun.js
+++ b/netwerk/test/unit/test_content_length_underrun.js
@@ -72,17 +72,17 @@ function run_gzip_test(num)
 
     onStopRequest: function(aRequest, aStatusCode) {
       // Make sure we catch the error NS_ERROR_NET_PARTIAL_TRANSFER here.
       Assert.equal(aStatusCode, Cr.NS_ERROR_NET_PARTIAL_TRANSFER);
       //  do_test_finished();
         endTests();
     },
 
-    onDataAvailable: function(request, context, stream, offset, count) {}
+    onDataAvailable: function(request, stream, offset, count) {}
   };
 
   let listener = new StreamListener();
  
   channel.asyncOpen(listener);
 
 }
 
--- a/netwerk/test/unit/test_crossOriginOpenerPolicy.js
+++ b/netwerk/test/unit/test_crossOriginOpenerPolicy.js
@@ -17,17 +17,17 @@ class OnStartListener {
     this.callback = onStartCallback;
     this.done = new Promise(resolve => { this.resolve = resolve; });
   }
 
   onStartRequest(request) {
     this.callback(request.QueryInterface(Ci.nsIHttpChannel));
   }
 
-  onDataAvailable(request, context, stream, offset, count) {
+  onDataAvailable(request, stream, offset, count) {
     let string = NetUtil.readInputStreamToString(stream, count);
   }
 
   onStopRequest(request, status) { this.resolve(); }
 }
 
 
 function handler_null(metadata, response)
--- a/netwerk/test/unit/test_file_protocol.js
+++ b/netwerk/test/unit/test_file_protocol.js
@@ -82,17 +82,17 @@ FileStreamListener.prototype = {
     if (!this._isDir(request)) {
       request.QueryInterface(Ci.nsIChannel);
       this._contentLen = request.contentLength;
       if (this._contentLen == -1)
         do_throw("Content length is unknown in onStartRequest!");
     }
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     if (!this._got_onstartrequest)
       do_throw("onDataAvailable without onStartRequest event!");
     if (this._got_onstoprequest)
       do_throw("onDataAvailable after onStopRequest event!");
     if (!request.isPending())
       do_throw("request reports itself as not pending from onStartRequest!");
 
     this._buffer = this._buffer.concat(read_stream(stream, count));
--- a/netwerk/test/unit/test_http2.js
+++ b/netwerk/test/unit/test_http2.js
@@ -58,17 +58,17 @@ Http2CheckListener.prototype = {
 
     Assert.ok(request instanceof Ci.nsIHttpChannel);
     Assert.equal(request.requestSucceeded, this.shouldSucceed);
     if (this.shouldSucceed) {
       Assert.equal(request.responseStatus, 200);
     }
   },
 
-  onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
+  onDataAvailable: function testOnDataAvailable(request, stream, off, cnt) {
     this.onDataAvailableFired = true;
     this.isHttp2Connection = checkIsHttp2(request);
     this.accum += cnt;
     read_stream(stream, cnt);
   },
 
   onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(this.onStartRequestFired);
@@ -106,17 +106,17 @@ function register_completed_channel(list
 /* Listener class to control the testing of multiplexing */
 var Http2MultiplexListener = function() {};
 
 Http2MultiplexListener.prototype = new Http2CheckListener();
 
 Http2MultiplexListener.prototype.streamID = 0;
 Http2MultiplexListener.prototype.buffer = "";
 
-Http2MultiplexListener.prototype.onDataAvailable = function(request, ctx, stream, off, cnt) {
+Http2MultiplexListener.prototype.onDataAvailable = function(request, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.isHttp2Connection = checkIsHttp2(request);
   this.streamID = parseInt(request.getResponseHeader("X-Http2-StreamID"));
   var data = read_stream(stream, cnt);
   this.buffer = this.buffer.concat(data);
 };
 
 Http2MultiplexListener.prototype.onStopRequest = function(request, status) {
@@ -133,32 +133,32 @@ Http2MultiplexListener.prototype.onStopR
 var Http2HeaderListener = function(name, callback) {
   this.name = name;
   this.callback = callback;
 };
 
 Http2HeaderListener.prototype = new Http2CheckListener();
 Http2HeaderListener.prototype.value = "";
 
-Http2HeaderListener.prototype.onDataAvailable = function(request, ctx, stream, off, cnt) {
+Http2HeaderListener.prototype.onDataAvailable = function(request, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.isHttp2Connection = checkIsHttp2(request);
   var hvalue = request.getResponseHeader(this.name);
   Assert.notEqual(hvalue, "");
   this.callback(hvalue);
   read_stream(stream, cnt);
 };
 
 var Http2PushListener = function(shouldBePushed) {
   this.shouldBePushed = shouldBePushed;
 };
 
 Http2PushListener.prototype = new Http2CheckListener();
 
-Http2PushListener.prototype.onDataAvailable = function(request, ctx, stream, off, cnt) {
+Http2PushListener.prototype.onDataAvailable = function(request, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.isHttp2Connection = checkIsHttp2(request);
   if (request.originalURI.spec == "https://localhost:" + serverPort + "/push.js"  ||
       request.originalURI.spec == "https://localhost:" + serverPort + "/push2.js" ||
       request.originalURI.spec == "https://localhost:" + serverPort + "/push5.js") {
     Assert.equal(request.getResponseHeader("pushed"), this.shouldBePushed ? "yes" : "no");
   }
   read_stream(stream, cnt);
@@ -185,17 +185,17 @@ Http2ContinuedHeaderListener.prototype.Q
     return this;
   throw Cr.NS_ERROR_NO_INTERFACE;
 };
 
 Http2ContinuedHeaderListener.prototype.getInterface = function(aIID) {
   return this.QueryInterface(aIID);
 };
 
-Http2ContinuedHeaderListener.prototype.onDataAvailable = function (request, ctx, stream, off, cnt) {
+Http2ContinuedHeaderListener.prototype.onDataAvailable = function (request, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.isHttp2Connection = checkIsHttp2(request);
   if (request.originalURI.spec == "https://localhost:" + serverPort + "/continuedheaders") {
     // This is the original request, so the only one where we'll have continued response headers
     checkContinuedHeaders(request.getResponseHeader, "X-Pull-Test-Header-", pullHdrTxt);
   }
   read_stream(stream, cnt);
 };
@@ -222,17 +222,17 @@ Http2ContinuedHeaderListener.prototype.o
 };
 
 // Does the appropriate checks for a large GET response
 var Http2BigListener = function() {};
 
 Http2BigListener.prototype = new Http2CheckListener();
 Http2BigListener.prototype.buffer = "";
 
-Http2BigListener.prototype.onDataAvailable = function(request, ctx, stream, off, cnt) {
+Http2BigListener.prototype.onDataAvailable = function(request, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.isHttp2Connection = checkIsHttp2(request);
   this.buffer = this.buffer.concat(read_stream(stream, cnt));
   // We know the server should send us the same data as our big post will be,
   // so the md5 should be the same
   Assert.equal(bigListenerMD5, request.getResponseHeader("X-Expected-MD5"));
 };
 
@@ -248,17 +248,17 @@ Http2BigListener.prototype.onStopRequest
   do_test_finished();
 };
 
 var Http2HugeSuspendedListener = function() {};
 
 Http2HugeSuspendedListener.prototype = new Http2CheckListener();
 Http2HugeSuspendedListener.prototype.count = 0;
 
-Http2HugeSuspendedListener.prototype.onDataAvailable = function(request, ctx, stream, off, cnt) {
+Http2HugeSuspendedListener.prototype.onDataAvailable = function(request, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.isHttp2Connection = checkIsHttp2(request);
   this.count += cnt;
   read_stream(stream, cnt);
 };
 
 Http2HugeSuspendedListener.prototype.onStopRequest = function(request, status) {
   Assert.ok(this.onStartRequestFired);
@@ -272,17 +272,17 @@ Http2HugeSuspendedListener.prototype.onS
 // Does the appropriate checks for POSTs
 var Http2PostListener = function(expected_md5) {
   this.expected_md5 = expected_md5;
 };
 
 Http2PostListener.prototype = new Http2CheckListener();
 Http2PostListener.prototype.expected_md5 = "";
 
-Http2PostListener.prototype.onDataAvailable = function(request, ctx, stream, off, cnt) {
+Http2PostListener.prototype.onDataAvailable = function(request, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.isHttp2Connection = checkIsHttp2(request);
   read_stream(stream, cnt);
   Assert.equal(this.expected_md5, request.getResponseHeader("X-Calculated-MD5"));
 };
 
 function makeChan(url) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true})
@@ -303,17 +303,17 @@ ResumeStalledChannelListener.prototype =
     if (!Components.isSuccessCode(request.status))
       do_throw("Channel should have a success code! (" + request.status + ")");
 
     Assert.ok(request instanceof Ci.nsIHttpChannel);
     Assert.equal(request.responseStatus, 200);
     Assert.equal(request.requestSucceeded, true);
   },
 
-  onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
+  onDataAvailable: function testOnDataAvailable(request, stream, off, cnt) {
     this.onDataAvailableFired = true;
     this.isHttp2Connection = checkIsHttp2(request);
     read_stream(stream, cnt);
   },
 
   onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(this.onStartRequestFired);
     Assert.ok(Components.isSuccessCode(status));
@@ -597,17 +597,17 @@ var httpserv2 = null;
 var ios = Cc["@mozilla.org/network/io-service;1"]
             .getService(Ci.nsIIOService);
 
 var altsvcClientListener = {
   onStartRequest: function test_onStartR(request) {
     Assert.equal(request.status, Cr.NS_OK);
   },
 
-  onDataAvailable: function test_ODA(request, cx, stream, offset, cnt) {
+  onDataAvailable: function test_ODA(request, stream, offset, cnt) {
    read_stream(stream, cnt);
   },
 
   onStopRequest: function test_onStopR(request, status) {
     var isHttp2Connection = checkIsHttp2(request.QueryInterface(Ci.nsIHttpChannel));
     if (!isHttp2Connection) {
       dump("/altsvc1 not over h2 yet - retry\n");
       var chan = makeChan("http://foo.example.com:" + httpserv.identity.primaryPort + "/altsvc1")
@@ -628,17 +628,17 @@ var altsvcClientListener = {
   }
 };
 
 var altsvcClientListener2 = {
   onStartRequest: function test_onStartR(request) {
     Assert.equal(request.status, Cr.NS_OK);
   },
 
-  onDataAvailable: function test_ODA(request, cx, stream, offset, cnt) {
+  onDataAvailable: function test_ODA(request, stream, offset, cnt) {
    read_stream(stream, cnt);
   },
 
   onStopRequest: function test_onStopR(request, status) {
     var isHttp2Connection = checkIsHttp2(request.QueryInterface(Ci.nsIHttpChannel));
     if (!isHttp2Connection) {
       dump("/altsvc2 not over h2 yet - retry\n");
       var chan = makeChan("http://foo.example.com:" + httpserv2.identity.primaryPort + "/altsvc2")
@@ -730,17 +730,17 @@ Http2PushApiListener.prototype = {
       Assert.ok(pushChannel.getRequestHeader("Accept-Encoding").includes("br"));
     }
   },
 
  // normal Channel listeners
   onStartRequest: function pushAPIOnStart(request) {
   },
 
-  onDataAvailable: function pushAPIOnDataAvailable(request, ctx, stream, offset, cnt) {
+  onDataAvailable: function pushAPIOnDataAvailable(request, stream, offset, cnt) {
     Assert.notEqual(request.originalURI.spec, "https://localhost:" + serverPort + "/pushapi1/2");
 
     var data = read_stream(stream, cnt);
 
     if (request.originalURI.spec == "https://localhost:" + serverPort + "/pushapi1") {
       Assert.equal(data[0], '0');
       --this.checksPending;
     } else if (request.originalURI.spec == "https://localhost:" + serverPort + "/pushapi1/1") {
@@ -969,17 +969,17 @@ function test_http2_status_phrase() {
   listener.shouldSucceed = false;
   chan.asyncOpen(listener);
 }
 
 var PulledDiskCacheListener = function() {};
 PulledDiskCacheListener.prototype = new Http2CheckListener();
 PulledDiskCacheListener.prototype.EXPECTED_DATA = "this was pulled via h2";
 PulledDiskCacheListener.prototype.readData = "";
-PulledDiskCacheListener.prototype.onDataAvailable = function testOnDataAvailable(request, ctx, stream, off, cnt) {
+PulledDiskCacheListener.prototype.onDataAvailable = function testOnDataAvailable(request, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.isHttp2Connection = checkIsHttp2(request);
   this.accum += cnt;
   this.readData += read_stream(stream, cnt);
 };
 PulledDiskCacheListener.prototype.onStopRequest = function testOnStopRequest(request, status) {
   Assert.equal(this.EXPECTED_DATA, this.readData);
   Http2CheckListener.prorotype.onStopRequest.call(this, request, status);
@@ -999,17 +999,17 @@ FromDiskCacheListener.prototype = {
       do_throw("Channel should have a success code! (" + request.status + ")");
     }
 
     Assert.ok(request instanceof Ci.nsIHttpChannel);
     Assert.ok(request.requestSucceeded);
     Assert.equal(request.responseStatus, 200);
   },
 
-  onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
+  onDataAvailable: function testOnDataAvailable(request, stream, off, cnt) {
     this.onDataAvailableFired = true;
     this.readData += read_stream(stream, cnt);
   },
 
   onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(this.onStartRequestFired);
     Assert.ok(Components.isSuccessCode(status));
     Assert.ok(this.onDataAvailableFired);
@@ -1089,17 +1089,17 @@ Http2DoublepushListener.prototype.onStop
   var listener = new Http2DoublypushedListener();
   chan.loadGroup = loadGroup;
   chan.asyncOpen(listener);
 };
 
 var Http2DoublypushedListener = function () {};
 Http2DoublypushedListener.prototype = new Http2CheckListener();
 Http2DoublypushedListener.prototype.readData = "";
-Http2DoublypushedListener.prototype.onDataAvailable = function (request, ctx, stream, off, cnt) {
+Http2DoublypushedListener.prototype.onDataAvailable = function (request, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.accum += cnt;
   this.readData += read_stream(stream, cnt);
 };
 Http2DoublypushedListener.prototype.onStopRequest = function (request, status) {
   Assert.ok(this.onStartRequestFired);
   Assert.ok(Components.isSuccessCode(status));
   Assert.ok(this.onDataAvailableFired);
--- a/netwerk/test/unit/test_httpResponseTimeout.js
+++ b/netwerk/test/unit/test_httpResponseTimeout.js
@@ -25,17 +25,17 @@ var server = new HttpServer();
 function TimeoutListener(expectResponse) {
   this.expectResponse = expectResponse;
 }
 
 TimeoutListener.prototype = {
   onStartRequest: function (request) {
   },
 
-  onDataAvailable: function (request, ctx, stream) {
+  onDataAvailable: function (request, stream) {
   },
 
   onStopRequest: function (request, status) {
     if (this.expectResponse) {
       Assert.equal(status, Cr.NS_OK);
     } else {
       Assert.equal(status, Cr.NS_ERROR_NET_TIMEOUT);
     }
--- a/netwerk/test/unit/test_httpsuspend.js
+++ b/netwerk/test/unit/test_httpsuspend.js
@@ -30,17 +30,17 @@ var listener = {
     // Insert a delay between this and the next callback to ensure message buffering
     // works correctly
     request.suspend();
     request.suspend();
     do_timeout(RESUME_DELAY, function() { request.resume(); });
     do_timeout(RESUME_DELAY + 1000, function() { request.resume(); });
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     Assert.ok(Date.now() - this._lastEvent >= MIN_TIME_DIFFERENCE);
     read_stream(stream, count);
 
     // Ensure that suspending and resuming inside a callback works correctly
     request.suspend();
     request.suspend();
     request.resume();
     request.resume();
--- a/netwerk/test/unit/test_immutable.js
+++ b/netwerk/test/unit/test_immutable.js
@@ -80,17 +80,17 @@ Listener.prototype = {
         do_throw("Channel should have a success code! (" + request.status + ")");
       }
       Assert.equal(request.responseStatus, 200);
     } else {
       Assert.equal(Components.isSuccessCode(request.status), false);
     }
   },
 
-  onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
+  onDataAvailable: function testOnDataAvailable(request, stream, off, cnt) {
     read_stream(stream, cnt);
   },
 
   onStopRequest: function testOnStopRequest(request, status) {
       if (expectConditional) {
         Assert.equal(request.getResponseHeader("x-conditional"), "true");
       } else {
 	  try { Assert.notEqual(request.getResponseHeader("x-conditional"), "true"); }
--- a/netwerk/test/unit/test_mismatch_last-modified.js
+++ b/netwerk/test/unit/test_mismatch_last-modified.js
@@ -25,17 +25,17 @@ var listener_3 = {
             iid.equals(Ci.nsIRequestObserver) ||
             iid.equals(Ci.nsISupports))
 	    return this;
 	throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
     onStartRequest: function test_onStartR(request) {},
     
-    onDataAvailable: function test_ODA(request, cx, inputStream,
+    onDataAvailable: function test_ODA(request, inputStream,
                                        offset, count) {
 	var data = new BinaryInputStream(inputStream).readByteArray(count);
       
 	Assert.equal(data[0], "B".charCodeAt(0));
     },
 
     onStopRequest: function test_onStopR(request, status) {
 	httpserver.stop(do_test_finished);
@@ -52,17 +52,17 @@ XPCOMUtils.defineLazyGetter(this, "liste
             iid.equals(Ci.nsIRequestObserver) ||
             iid.equals(Ci.nsISupports))
 	    return this;
 	throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
     onStartRequest: function test_onStartR(request) {},
     
-    onDataAvailable: function test_ODA(request, cx, inputStream,
+    onDataAvailable: function test_ODA(request, inputStream,
                                        offset, count) {
 	var data = new BinaryInputStream(inputStream).readByteArray(count);
       
 	// This is 'A' from a cache revalidation, but that reval will clean the cache
 	// because of mismatched last-modified response headers
 	
 	Assert.equal(data[0], "A".charCodeAt(0));
     },
@@ -88,17 +88,17 @@ XPCOMUtils.defineLazyGetter(this, "liste
             iid.equals(Ci.nsIRequestObserver) ||
             iid.equals(Ci.nsISupports))
 	    return this;
 	throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
     onStartRequest: function test_onStartR(request) {},
     
-    onDataAvailable: function test_ODA(request, cx, inputStream,
+    onDataAvailable: function test_ODA(request, inputStream,
                                        offset, count) {
 	var data = new BinaryInputStream(inputStream).readByteArray(count);
 	Assert.equal(data[0], "A".charCodeAt(0));
     },
 
     onStopRequest: function test_onStopR(request, status) {
     var channel = request.QueryInterface(Ci.nsIHttpChannel);
     var chan = NetUtil.newChannel({
--- a/netwerk/test/unit/test_multipart_byteranges.js
+++ b/netwerk/test/unit/test_multipart_byteranges.js
@@ -71,17 +71,17 @@ var multipartListener = {
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
   onStartRequest: function(request) {
     this._buffer = "";
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     try {
       this._buffer = this._buffer.concat(read_stream(stream, count));
       dump("BUFFEEE: " + this._buffer + "\n\n");
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
   },
 
--- a/netwerk/test/unit/test_multipart_streamconv-byte-by-byte.js
+++ b/netwerk/test/unit/test_multipart_streamconv-byte-by-byte.js
@@ -65,17 +65,17 @@ var multipartListener = {
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
   onStartRequest: function(request) {
     this._buffer = "";
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     try {
       this._buffer = this._buffer.concat(read_stream(stream, count));
       dump("BUFFEEE: " + this._buffer + "\n\n");
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
   },
 
--- a/netwerk/test/unit/test_multipart_streamconv.js
+++ b/netwerk/test/unit/test_multipart_streamconv.js
@@ -49,17 +49,17 @@ var multipartListener = {
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
   onStartRequest: function(request) {
     this._buffer = "";
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     try {
       this._buffer = this._buffer.concat(read_stream(stream, count));
       dump("BUFFEEE: " + this._buffer + "\n\n");
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
   },
 
--- a/netwerk/test/unit/test_multipart_streamconv_missing_boundary_lead_dashes.js
+++ b/netwerk/test/unit/test_multipart_streamconv_missing_boundary_lead_dashes.js
@@ -47,17 +47,17 @@ var multipartListener = {
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
   onStartRequest: function(request) {
     this._buffer = "";
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     try {
       this._buffer = this._buffer.concat(read_stream(stream, count));
       dump("BUFFEEE: " + this._buffer + "\n\n");
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
   },
 
--- a/netwerk/test/unit/test_multipart_streamconv_missing_lead_boundary.js
+++ b/netwerk/test/unit/test_multipart_streamconv_missing_lead_boundary.js
@@ -47,17 +47,17 @@ var multipartListener = {
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
   onStartRequest: function(request) {
     this._buffer = "";
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     try {
       this._buffer = this._buffer.concat(read_stream(stream, count));
       dump("BUFFEEE: " + this._buffer + "\n\n");
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
   },
 
--- a/netwerk/test/unit/test_origin.js
+++ b/netwerk/test/unit/test_origin.js
@@ -78,17 +78,17 @@ Listener.prototype = {
 
     if (!Components.isSuccessCode(request.status)) {
       do_throw("Channel should have a success code! (" + request.status + ")");
     }
     Assert.equal(request.responseStatus, 200);
     this.clientPort = parseInt(request.getResponseHeader("x-client-port"));
   },
 
-  onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
+  onDataAvailable: function testOnDataAvailable(request, stream, off, cnt) {
     read_stream(stream, cnt);
   },
 
   onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(Components.isSuccessCode(status));
     if (nextPortExpectedToBeSame) {
      Assert.equal(currentPort, this.clientPort);
     } else {
@@ -101,17 +101,17 @@ Listener.prototype = {
 };
 
 var FailListener = function() {};
 FailListener.prototype = {
   onStartRequest: function testOnStartRequest(request) {
     Assert.ok(request instanceof Ci.nsIHttpChannel);
     Assert.ok(!Components.isSuccessCode(request.status));
   },
-  onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
+  onDataAvailable: function testOnDataAvailable(request, stream, off, cnt) {
     read_stream(stream, cnt);
   },
   onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(!Components.isSuccessCode(request.status));
     nextTest();
     do_test_finished();
   }
 };
@@ -293,17 +293,17 @@ Http2PushApiListener.prototype = {
     pushChannel.cancel(Cr.NS_ERROR_ABORT);
   },
 
  // normal Channel listeners
   onStartRequest: function pushAPIOnStart(request) {
     dump("push api onstart " + request.originalURI.spec + "\n");
   },
 
-  onDataAvailable: function pushAPIOnDataAvailable(request, ctx, stream, offset, cnt) {
+  onDataAvailable: function pushAPIOnDataAvailable(request, stream, offset, cnt) {
     var data = read_stream(stream, cnt);
   },
 
   onStopRequest: function test_onStopR(request, status) {
     dump("push api onstop " + request.originalURI.spec + "\n");
     Assert.ok(this.fooOK);
     Assert.ok(this.alt1OK);
     nextTest();
--- a/netwerk/test/unit/test_predictor.js
+++ b/netwerk/test/unit/test_predictor.js
@@ -425,17 +425,17 @@ function prefetchHandler(metadata, respo
   response.bodyOutputStream.write(body, body.length);
 }
 
 var prefetchListener = {
   onStartRequest: function(request) {
     Assert.equal(request.status, Cr.NS_OK);
   },
 
-  onDataAvailable: function(request, cx, stream, offset, cnt) {
+  onDataAvailable: function(request, stream, offset, cnt) {
     read_stream(stream, cnt);
   },
 
   onStopRequest: function(request, status) {
     run_next_test();
   }
 };
 
--- a/netwerk/test/unit/test_progress.js
+++ b/netwerk/test/unit/test_progress.js
@@ -47,21 +47,21 @@ var progressCallback = {
     Assert.equal(this._last_callback_handled, TYPE_ONSTATUS);
     this._got_onstartrequest = true;
     this._last_callback_handled = TYPE_ONSTARTREQUEST;
 
     this._listener = new ChannelListener(checkRequest, request);
     this._listener.onStartRequest(request);
   },
 
-  onDataAvailable: function(request, context, data, offset, count) {
+  onDataAvailable: function(request, data, offset, count) {
     Assert.equal(this._last_callback_handled, TYPE_ONPROGRESS);
     this._last_callback_handled = TYPE_ONDATAAVAILABLE;
 
-    this._listener.onDataAvailable(request, context, data, offset, count);
+    this._listener.onDataAvailable(request, data, offset, count);
   },
 
   onStopRequest: function(request, status) {
     Assert.equal(this._last_callback_handled, TYPE_ONDATAAVAILABLE);
     Assert.ok(this._got_onstatus_after_onstartrequest);
     this._last_callback_handled = TYPE_ONSTOPREQUEST;
 
     this._listener.onStopRequest(request, status);
--- a/netwerk/test/unit/test_range_requests.js
+++ b/netwerk/test/unit/test_range_requests.js
@@ -48,17 +48,17 @@ Canceler.prototype = {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
   onStartRequest: function(request) { },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     request.QueryInterface(Ci.nsIChannel)
            .cancel(Cr.NS_BINDING_ABORTED);
   },
   onStopRequest: function(request, status) {
     Assert.equal(status, Cr.NS_BINDING_ABORTED);
     this.continueFn(request, null);
   }
 };
@@ -72,17 +72,17 @@ MyListener.prototype = {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
   onStartRequest: function(request) { this._buffer = ""; },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     this._buffer = this._buffer.concat(read_stream(stream, count));
   },
   onStopRequest: function(request, status) {
     this.continueFn(request, this._buffer);
   }
 };
 
 var case_8_range_request = false;
@@ -94,17 +94,17 @@ FailedChannelListener.prototype = {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
   onStartRequest: function(request) { },
 
-  onDataAvailable: function(request, context, stream, offset, count) { },
+  onDataAvailable: function(request, stream, offset, count) { },
 
   onStopRequest: function(request, status) {
     if (case_8_range_request)
       Assert.equal(status, Cr.NS_ERROR_CORRUPTED_CONTENT);
     this.continueFn(request, null);
   }
 };
 
--- a/netwerk/test/unit/test_reentrancy.js
+++ b/netwerk/test/unit/test_reentrancy.js
@@ -50,17 +50,17 @@ var listener = {
         executeSoon(function() { request.resume(); });
         syncXHR();
         break;
     }
     
     this._done_onStart = true;
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     Assert.ok(this._done_onStart);
     read_stream(stream, count);
     this._done_onData = true;
   },
 
   onStopRequest: function(request, status) {
     Assert.ok(this._done_onData);
     this._reset();
--- a/netwerk/test/unit/test_reopen.js
+++ b/netwerk/test/unit/test_reopen.js
@@ -69,17 +69,17 @@ function check_async_open_throws(error) 
   }, error);
 }
 
 var listener = {
   onStartRequest: function test_onStartR(request) {
     check_async_open_throws(NS_ERROR_IN_PROGRESS);
   },
 
-  onDataAvailable: function test_ODA(request, cx, inputStream,
+  onDataAvailable: function test_ODA(request, inputStream,
                                      offset, count) {
     new BinaryInputStream(inputStream).readByteArray(count); // required by API
     check_async_open_throws(NS_ERROR_IN_PROGRESS);
   },
 
   onStopRequest: function test_onStopR(request, status) {
     // Once onStopRequest is reached, the channel is marked as having been
     // opened
--- a/netwerk/test/unit/test_resumable_truncate.js
+++ b/netwerk/test/unit/test_resumable_truncate.js
@@ -44,17 +44,17 @@ Canceler.prototype = {
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
   onStartRequest: function(request) {
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable: function(request, stream, offset, count) {
     request.QueryInterface(Ci.nsIChannel)
            .cancel(Cr.NS_BINDING_ABORTED);
   },
 
   onStopRequest: function(request, status) {
     Assert.equal(status, Cr.NS_BINDING_ABORTED);
     this.continueFn();
   }
--- a/netwerk/test/unit/test_separate_connections.js
+++ b/netwerk/test/unit/test_separate_connections.js
@@ -55,17 +55,17 @@ Listener.prototype = {
           Assert.notEqual(hashKey, previousHashKeys[userContextId]);
         }
       }
     } else {
       // Set the hash keys in the first round.
       previousHashKeys[this.userContextId] = hashKey;
     }
   },
-  onDataAvailable: function(request, ctx, stream, off, cnt) {
+  onDataAvailable: function(request, stream, off, cnt) {
     read_stream(stream, cnt);
   },
   onStopRequest: function() {
     gTestsRun++;
     if (gTestsRun == 3) {
       gTestsRun = 0;
       if (gSecondRoundStarted) {
         // The second round finishes.
--- a/netwerk/test/unit/test_suspend_channel_on_examine_merged_response.js
+++ b/netwerk/test/unit/test_suspend_channel_on_examine_merged_response.js
@@ -40,17 +40,17 @@ var observer = {
   }
 };
 
 var listener = {
   onStartRequest: function (request) {
     buffer = "";
   },
 
-  onDataAvailable: function (request, ctx, stream, offset, count) {
+  onDataAvailable: function (request, stream, offset, count) {
     buffer = buffer.concat(read_stream(stream, count));
   },
 
   onStopRequest: function (request, status) {
     Assert.equal(status, Cr.NS_OK);
     Assert.equal(buffer, "0123456789");
     Assert.equal(channelResumed, true);
     Assert.equal(observerCalled, true);
--- a/netwerk/test/unit/test_tls_flags_separate_connections.js
+++ b/netwerk/test/unit/test_tls_flags_separate_connections.js
@@ -75,17 +75,17 @@ Listener.prototype = {
           Assert.notEqual(hashKey, previousHashKeys[tlsFlags]);
         }
       }
     } else {
       // Set the hash keys in the first round.
       previousHashKeys[this.tlsFlags] = hashKey;
     }
   },
-  onDataAvailable: function(request, ctx, stream, off, cnt) {
+  onDataAvailable: function(request, stream, off, cnt) {
     read_stream(stream, cnt);
   },
   onStopRequest: function() {
     gTestsRun++;
     if (gTestsRun == randomFlagValues.length) {
       gTestsRun = 0;
       if (gSecondRoundStarted) {
         // The second round finishes.
--- a/netwerk/test/unit/test_trackingProtection_annotateChannels.js
+++ b/netwerk/test/unit/test_trackingProtection_annotateChannels.js
@@ -41,17 +41,17 @@ listener.prototype = {
     if (runtime.processType == runtime.PROCESS_TYPE_DEFAULT && this._tracking) {
       Assert.equal(!!(request.QueryInterface(Ci.nsIClassOfService).classFlags &
                        Ci.nsIClassOfService.Throttleable),
                    this._throttleable, "throttleable flag");
     }
     request.cancel(Cr.NS_ERROR_ABORT);
     this._nextTest();
   },
-  onDataAvailable: (request, context, stream, offset, count) => {},
+  onDataAvailable: (request, stream, offset, count) => {},
   onStopRequest: (request, status) => {},
 };
 
 var httpServer;
 var normalOrigin, trackingOrigin;
 var testPriorityMap;
 var currentTest;
 // When this test is running in e10s mode, the parent process is in charge of
--- a/parser/html/nsHtml5StreamListener.cpp
+++ b/parser/html/nsHtml5StreamListener.cpp
@@ -47,18 +47,17 @@ nsHtml5StreamListener::OnStopRequest(nsI
   if (MOZ_UNLIKELY(!mDelegate)) {
     return NS_ERROR_NOT_AVAILABLE;
   }
   return mDelegate->OnStopRequest(aRequest, aStatus);
 }
 
 NS_IMETHODIMP
 nsHtml5StreamListener::OnDataAvailable(nsIRequest* aRequest,
-                                       nsISupports* aContext,
                                        nsIInputStream* aInStream,
                                        uint64_t aSourceOffset,
                                        uint32_t aLength) {
   if (MOZ_UNLIKELY(!mDelegate)) {
     return NS_ERROR_NOT_AVAILABLE;
   }
-  return mDelegate->OnDataAvailable(aRequest, aContext, aInStream,
+  return mDelegate->OnDataAvailable(aRequest, aInStream,
                                     aSourceOffset, aLength);
 }
--- a/parser/html/nsHtml5StreamParser.cpp
+++ b/parser/html/nsHtml5StreamParser.cpp
@@ -1304,17 +1304,16 @@ class nsHtml5DataAvailable : public Runn
   NS_IMETHOD Run() override {
     mozilla::MutexAutoLock autoLock(mStreamParser->mTokenizerMutex);
     mStreamParser->DoDataAvailableBuffer(std::move(mData));
     return NS_OK;
   }
 };
 
 nsresult nsHtml5StreamParser::OnDataAvailable(nsIRequest* aRequest,
-                                              nsISupports* aContext,
                                               nsIInputStream* aInStream,
                                               uint64_t aSourceOffset,
                                               uint32_t aLength) {
   nsresult rv;
   if (NS_FAILED(rv = mExecutor->IsBroken())) {
     return rv;
   }
 
--- a/parser/html/nsHtml5StreamParser.h
+++ b/parser/html/nsHtml5StreamParser.h
@@ -123,17 +123,17 @@ class nsHtml5StreamParser final : public
   nsHtml5StreamParser(nsHtml5TreeOpExecutor* aExecutor, nsHtml5Parser* aOwner,
                       eParserMode aMode);
 
   // Methods that nsHtml5StreamListener calls
   nsresult CheckListenerChain();
 
   nsresult OnStartRequest(nsIRequest* aRequest);
 
-  nsresult OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+  nsresult OnDataAvailable(nsIRequest* aRequest,
                            nsIInputStream* aInStream, uint64_t aSourceOffset,
                            uint32_t aLength);
 
   nsresult OnStopRequest(nsIRequest* aRequest,
                          nsresult status);
 
   // nsICharsetDetectionObserver
   /**
--- a/parser/htmlparser/nsParser.cpp
+++ b/parser/htmlparser/nsParser.cpp
@@ -1254,17 +1254,17 @@ static nsresult ParserWriteFunc(nsIInput
   result = pws->mScanner->Append(fromRawSegment, theNumRead);
   if (NS_SUCCEEDED(result)) {
     *writeCount = count;
   }
 
   return result;
 }
 
-nsresult nsParser::OnDataAvailable(nsIRequest* request, nsISupports* aContext,
+nsresult nsParser::OnDataAvailable(nsIRequest* request,
                                    nsIInputStream* pIStream,
                                    uint64_t sourceOffset, uint32_t aLength) {
   MOZ_ASSERT((eOnStart == mParserContext->mStreamListenerState ||
               eOnDataAvail == mParserContext->mStreamListenerState),
              "Error: OnStartRequest() must be called before OnDataAvailable()");
   MOZ_ASSERT(NS_InputStreamIsBuffered(pIStream),
              "Must have a buffered input stream");
 
--- a/security/manager/ssl/ContentSignatureVerifier.cpp
+++ b/security/manager/ssl/ContentSignatureVerifier.cpp
@@ -561,17 +561,16 @@ ContentSignatureVerifier::OnStopRequest(
 
   mHasCertChain = true;
   callback->ContextCreated(true);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ContentSignatureVerifier::OnDataAvailable(nsIRequest* aRequest,
-                                          nsISupports* aContext,
                                           nsIInputStream* aInputStream,
                                           uint64_t aOffset, uint32_t aCount) {
   MOZ_ASSERT(NS_IsMainThread());
   nsAutoCString buffer;
 
   nsresult rv = NS_ConsumeStream(aInputStream, aCount, buffer);
   if (NS_FAILED(rv)) {
     return rv;
--- a/security/manager/ssl/PSMContentListener.cpp
+++ b/security/manager/ssl/PSMContentListener.cpp
@@ -113,17 +113,16 @@ PSMContentStreamListener::OnStartRequest
   }
 
   mByteData.SetCapacity(contentLength);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PSMContentStreamListener::OnDataAvailable(nsIRequest* request,
-                                          nsISupports* context,
                                           nsIInputStream* aIStream,
                                           uint64_t aSourceOffset,
                                           uint32_t aLength) {
   MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("CertDownloader::OnDataAvailable\n"));
 
   nsCString chunk;
   nsresult rv = NS_ReadInputStreamToString(aIStream, chunk, aLength);
   if (NS_FAILED(rv)) {
@@ -284,17 +283,16 @@ PSMContentDownloaderChild::OnStartReques
   }
 
   mozilla::Unused << SendOnStartRequest(contentLength);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PSMContentDownloaderChild::OnDataAvailable(nsIRequest* request,
-                                           nsISupports* context,
                                            nsIInputStream* aIStream,
                                            uint64_t aSourceOffset,
                                            uint32_t aLength) {
   nsCString chunk;
   nsresult rv = NS_ReadInputStreamToString(aIStream, chunk, aLength);
   if (NS_FAILED(rv)) {
     return rv;
   }
--- a/services/common/rest.js
+++ b/services/common/rest.js
@@ -446,17 +446,17 @@ RESTRequest.prototype = {
 
     // Note that for privacy/security reasons we don't log this response body
 
     delete this._inputStream;
 
     this._deferred.resolve(this.response);
   },
 
-  onDataAvailable(channel, cb, stream, off, count) {
+  onDataAvailable(channel, stream, off, count) {
     // We get an nsIRequest, which doesn't have contentCharset.
     try {
       channel.QueryInterface(Ci.nsIHttpChannel);
     } catch (ex) {
       this._log.error("Unexpected error: channel not nsIHttpChannel!");
       this.abort(ex);
       return;
     }
--- a/services/common/utils.js
+++ b/services/common/utils.js
@@ -641,17 +641,17 @@ var CommonUtils = {
                                                   length, data) {
         result = String.fromCharCode.apply(this, data);
       },
     });
 
     let converter = this._converterService.asyncConvertData(source, dest,
                                                             listener, null);
     converter.onStartRequest(null, null);
-    converter.onDataAvailable(null, null, is, 0, s.length);
+    converter.onDataAvailable(null, is, 0, s.length);
     converter.onStopRequest(null, null, null);
 
     return result;
   },
 };
 
 XPCOMUtils.defineLazyGetter(CommonUtils, "_utf8Converter", function() {
   let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -2119,17 +2119,17 @@ SpecialPowersAPI.prototype = {
       let listener = {
         httpStatus: 0,
 
         onStartRequest(request) {
           request.QueryInterface(Ci.nsIHttpChannel);
           this.httpStatus = request.responseStatus;
         },
 
-        onDataAvailable(request, context, stream, offset, count) {
+        onDataAvailable(request, stream, offset, count) {
           new BinaryInputStream(stream).readByteArray(count);
         },
 
         onStopRequest(request, status) {
          /* testing here that the redirect was not followed. If it was followed
             we would see a http status of 200 and status of NS_OK */
 
           let httpStatus = this.httpStatus;
--- a/toolkit/components/aboutmemory/content/aboutMemory.js
+++ b/toolkit/components/aboutmemory/content/aboutMemory.js
@@ -665,17 +665,17 @@ function loadMemoryReportsFromFile(aFile
       return;
     }
 
     // Read compressed gzip file.
     let converter = new nsGzipConverter();
     converter.asyncConvertData("gzip", "uncompressed", {
       data: [],
       onStartRequest(aR, aC) {},
-      onDataAvailable(aR, aC, aStream, aO, aCount) {
+      onDataAvailable(aR, aStream, aO, aCount) {
         let bi = new nsBinaryStream(aStream);
         this.data.push(bi.readBytes(aCount));
       },
       onStopRequest(aR, aC, aStatusCode) {
         try {
           if (!Components.isSuccessCode(aStatusCode)) {
             throw new Components.Exception("Error while reading gzip file", aStatusCode);
           }
--- a/toolkit/components/downloads/DownloadCore.jsm
+++ b/toolkit/components/downloads/DownloadCore.jsm
@@ -2053,19 +2053,19 @@ this.DownloadCopySaver.prototype = {
             // background file saver that the operation can finish.  If the
             // data transfer failed, the saver has been already stopped.
             if (Components.isSuccessCode(aStatusCode)) {
               backgroundFileSaver.finish(Cr.NS_OK);
             }
           }
         },
 
-        onDataAvailable(aRequest, aContext, aInputStream,
+        onDataAvailable(aRequest, aInputStream,
                                   aOffset, aCount) {
-          backgroundFileSaver.onDataAvailable(aRequest, aContext,
+          backgroundFileSaver.onDataAvailable(aRequest,
                                               aInputStream, aOffset,
                                               aCount);
         },
       });
 
       // We should check if we have been canceled in the meantime, after
       // all the previous asynchronous operations have been executed and
       // just before we set the _backgroundFileSaver property.
--- a/toolkit/components/downloads/test/unit/head.js
+++ b/toolkit/components/downloads/test/unit/head.js
@@ -343,19 +343,19 @@ function promiseStartExternalHelperAppSe
                                        requestChannel.contentType, aRequest, null, true);
           this.contentListener.onStartRequest(aRequest);
         },
 
         onStopRequest(aRequest, aStatusCode) {
           this.contentListener.onStopRequest(aRequest, aStatusCode);
         },
 
-        onDataAvailable(aRequest, aContext, aInputStream, aOffset,
+        onDataAvailable(aRequest, aInputStream, aOffset,
                                   aCount) {
-          this.contentListener.onDataAvailable(aRequest, aContext, aInputStream,
+          this.contentListener.onDataAvailable(aRequest, aInputStream,
                                                aOffset, aCount);
         },
       });
     }).catch(do_report_unexpected_exception);
   });
 }
 
 /**
--- a/toolkit/components/extensions/test/xpcshell/test_locale_converter.js
+++ b/toolkit/components/extensions/test/xpcshell/test_locale_converter.js
@@ -60,17 +60,17 @@ add_task(async function testSynchronousC
 // split into multiple chunks, and a boundary in the middle of a
 // replacement token.
 add_task(async function testAsyncConvert() {
   let listener;
   let awaitResult = new Promise((resolve, reject) => {
     listener = {
       QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
-      onDataAvailable(request, context, inputStream, offset, count) {
+      onDataAvailable(request, inputStream, offset, count) {
         this.resultParts.push(NetUtil.readInputStreamToString(inputStream, count));
       },
 
       onStartRequest() {
         ok(!("resultParts" in this));
         this.resultParts = [];
       },
 
@@ -85,17 +85,17 @@ add_task(async function testAsyncConvert
   });
 
   let parts = ["Foo __MSG_x", "xx__ bar __MSG_yyy__ baz"];
 
   let converter = convService.asyncConvertData(FROM_TYPE, TO_TYPE, listener, URI);
   converter.onStartRequest(null, null);
 
   for (let part of parts) {
-    converter.onDataAvailable(null, null, StringStream(part), 0, part.length);
+    converter.onDataAvailable(null, StringStream(part), 0, part.length);
   }
 
   converter.onStopRequest(null, null, Cr.NS_OK);
 
 
   let result = await awaitResult;
   equal(result, "Foo <localized-xxx> bar <localized-yyy> baz");
 });
--- a/toolkit/components/extensions/webrequest/ChannelWrapper.cpp
+++ b/toolkit/components/extensions/webrequest/ChannelWrapper.cpp
@@ -942,22 +942,21 @@ ChannelWrapper::RequestListener::OnStopR
   mChannelWrapper->ErrorCheck();
   mChannelWrapper->FireEvent(NS_LITERAL_STRING("stop"));
 
   return mOrigStreamListener->OnStopRequest(request, aStatus);
 }
 
 NS_IMETHODIMP
 ChannelWrapper::RequestListener::OnDataAvailable(nsIRequest* request,
-                                                 nsISupports* aCtxt,
                                                  nsIInputStream* inStr,
                                                  uint64_t sourceOffset,
                                                  uint32_t count) {
   MOZ_ASSERT(mOrigStreamListener, "Should have mOrigStreamListener");
-  return mOrigStreamListener->OnDataAvailable(request, aCtxt, inStr,
+  return mOrigStreamListener->OnDataAvailable(request, inStr,
                                               sourceOffset, count);
 }
 
 NS_IMETHODIMP
 ChannelWrapper::RequestListener::CheckListenerChain() {
   MOZ_ASSERT(NS_IsMainThread(), "Should be on main thread!");
   nsresult rv;
   nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
--- a/toolkit/components/extensions/webrequest/StreamFilterParent.cpp
+++ b/toolkit/components/extensions/webrequest/StreamFilterParent.cpp
@@ -358,17 +358,17 @@ nsresult StreamFilterParent::Write(Data&
   AssertIsIOThread();
 
   nsCOMPtr<nsIInputStream> stream;
   nsresult rv = NS_NewByteInputStream(
       getter_AddRefs(stream),
       MakeSpan(reinterpret_cast<char*>(aData.Elements()), aData.Length()));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = mOrigListener->OnDataAvailable(mChannel, mContext, stream, mOffset,
+  rv = mOrigListener->OnDataAvailable(mChannel, stream, mOffset,
                                       aData.Length());
   NS_ENSURE_SUCCESS(rv, rv);
 
   mOffset += aData.Length();
   return NS_OK;
 }
 
 /*****************************************************************************
@@ -542,17 +542,17 @@ void StreamFilterParent::DoSendData(Data
   AssertIsActorThread();
 
   if (mState == State::TransferringData) {
     CheckResult(SendData(aData));
   }
 }
 
 NS_IMETHODIMP
-StreamFilterParent::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+StreamFilterParent::OnDataAvailable(nsIRequest* aRequest,
                                     nsIInputStream* aInputStream,
                                     uint64_t aOffset, uint32_t aCount) {
   AssertIsIOThread();
 
   if (mDisconnected) {
     // If we're offloading data in a thread pool, it's possible that we'll
     // have buffered some additional data while waiting for the buffer to
     // flush. So, if there's any buffered data left, flush that before we
@@ -560,17 +560,17 @@ StreamFilterParent::OnDataAvailable(nsIR
     //
     // Note: When in the eDisconnected state, the buffer list is guaranteed
     // never to be accessed by another thread during an OnDataAvailable call.
     if (!mBufferedData.isEmpty()) {
       FlushBufferedData();
     }
 
     mOffset += aCount;
-    return mOrigListener->OnDataAvailable(aRequest, aContext, aInputStream,
+    return mOrigListener->OnDataAvailable(aRequest, aInputStream,
                                           mOffset - aCount, aCount);
   }
 
   Data data;
   data.SetLength(aCount);
 
   uint32_t count;
   nsresult rv = aInputStream->Read(reinterpret_cast<char*>(data.Elements()),
--- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
+++ b/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
@@ -42,17 +42,17 @@ const tests = [
 
 // A basic listener that reads checks the if we sniffed properly.
 var listener = {
   onStartRequest(request) {
     Assert.equal(request.QueryInterface(Ci.nsIChannel).contentType,
                  tests[testRan].expectedContentType);
   },
 
-  onDataAvailable(request, context, stream, offset, count) {
+  onDataAvailable(request, stream, offset, count) {
     try {
       var bis = Cc["@mozilla.org/binaryinputstream;1"]
                   .createInstance(Ci.nsIBinaryInputStream);
       bis.setInputStream(stream);
       bis.readByteArray(bis.available());
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
--- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
+++ b/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
@@ -43,17 +43,17 @@ const tests = [
 
 // A basic listener that reads checks the if we sniffed properly.
 var listener = {
   onStartRequest(request) {
     info("Sniffing " + tests[testRan].path);
     Assert.equal(request.QueryInterface(Ci.nsIChannel).contentType, tests[testRan].expected);
   },
 
-  onDataAvailable(request, context, stream, offset, count) {
+  onDataAvailable(request, stream, offset, count) {
     try {
       var bis = Cc["@mozilla.org/binaryinputstream;1"]
                   .createInstance(Ci.nsIBinaryInputStream);
       bis.setInputStream(stream);
       bis.readByteArray(bis.available());
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
--- a/toolkit/components/places/FaviconHelpers.cpp
+++ b/toolkit/components/places/FaviconHelpers.cpp
@@ -634,17 +634,16 @@ AsyncFetchAndSetIconForPage::OnStartRequ
   if (mCanceled) {
     mRequest->Cancel(NS_BINDING_ABORTED);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 AsyncFetchAndSetIconForPage::OnDataAvailable(nsIRequest* aRequest,
-                                             nsISupports* aContext,
                                              nsIInputStream* aInputStream,
                                              uint64_t aOffset,
                                              uint32_t aCount) {
   MOZ_ASSERT(mIcon.payloads.Length() == 1);
   // Limit downloads to 500KB.
   const size_t kMaxDownloadSize = 500 * 1024;
   if (mIcon.payloads[0].data.Length() + aCount > kMaxDownloadSize) {
     mIcon.payloads.Clear();
--- a/toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js
+++ b/toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js
@@ -20,17 +20,17 @@ streamListener.prototype =
 {
   onStartRequest() {},
   onStopRequest(aRequest, aContext, aStatusCode) {
     let channel = aRequest.QueryInterface(Ci.nsIChannel);
     Assert.equal(channel.contentType, this._expectedContentType,
                  "The channel content type is the expected one");
     this.done.resolve();
   },
-  onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) {
+  onDataAvailable(aRequest, aInputStream, aOffset, aCount) {
     aRequest.cancel(Cr.NS_ERROR_ABORT);
     throw Cr.NS_ERROR_ABORT;
   },
 };
 
 add_task(async function() {
   info("Test that the default icon has the right content type.");
   let channel = NetUtil.newChannel({
--- a/toolkit/components/reputationservice/ApplicationReputation.cpp
+++ b/toolkit/components/reputationservice/ApplicationReputation.cpp
@@ -1659,17 +1659,17 @@ static nsresult AppendSegmentToString(ns
                                       uint32_t* writeCount) {
   nsAutoCString* decodedData = static_cast<nsAutoCString*>(closure);
   decodedData->Append(rawSegment, count);
   *writeCount = count;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-PendingLookup::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+PendingLookup::OnDataAvailable(nsIRequest* aRequest,
                                nsIInputStream* aStream, uint64_t offset,
                                uint32_t count) {
   uint32_t read;
   return aStream->ReadSegments(AppendSegmentToString, &mResponse, count, &read);
 }
 
 NS_IMETHODIMP
 PendingLookup::OnStartRequest(nsIRequest* aRequest) {
--- a/toolkit/components/search/SearchService.jsm
+++ b/toolkit/components/search/SearchService.jsm
@@ -281,17 +281,17 @@ loadListener.prototype = {
       this._bytes = null;
     }
     this._callback(this._bytes, this._engine);
     this._channel = null;
     this._engine = null;
   },
 
   // nsIStreamListener
-  onDataAvailable: function SRCH_loadDAvailable(aRequest, aContext,
+  onDataAvailable: function SRCH_loadDAvailable(aRequest,
                                                 aInputStream, aOffset,
                                                 aCount) {
     this._stream.setInputStream(aInputStream);
 
     // Get a byte array of the data
     this._bytes = this._bytes.concat(this._stream.readByteArray(aCount));
     this._countRead += aCount;
   },
--- a/toolkit/components/telemetry/app/TelemetrySend.jsm
+++ b/toolkit/components/telemetry/app/TelemetrySend.jsm
@@ -155,17 +155,17 @@ function gzipCompressString(string) {
                 .createInstance(Ci.nsIStreamLoader);
   listener.init(observer);
   let converter = scs.asyncConvertData("uncompressed", "gzip",
                                        listener, null);
   let stringStream = Cc["@mozilla.org/io/string-input-stream;1"]
                      .createInstance(Ci.nsIStringInputStream);
   stringStream.data = string;
   converter.onStartRequest(null, null);
-  converter.onDataAvailable(null, null, stringStream, 0, string.length);
+  converter.onDataAvailable(null, stringStream, 0, string.length);
   converter.onStopRequest(null, null, null);
   return observer.buffer;
 }
 
 var TelemetrySend = {
 
   get pendingPingCount() {
     return TelemetrySendImpl.pendingPingCount;
--- a/toolkit/components/telemetry/tests/unit/head.js
+++ b/toolkit/components/telemetry/tests/unit/head.js
@@ -149,17 +149,17 @@ function decodeRequestPayload(request) {
     let scs = Cc["@mozilla.org/streamConverters;1"]
               .getService(Ci.nsIStreamConverterService);
     let listener = Cc["@mozilla.org/network/stream-loader;1"]
                   .createInstance(Ci.nsIStreamLoader);
     listener.init(observer);
     let converter = scs.asyncConvertData("gzip", "uncompressed",
                                          listener, null);
     converter.onStartRequest(null, null);
-    converter.onDataAvailable(null, null, s, 0, s.available());
+    converter.onDataAvailable(null, s, 0, s.available());
     converter.onStopRequest(null, null, null);
     let unicodeConverter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
                     .createInstance(Ci.nsIScriptableUnicodeConverter);
     unicodeConverter.charset = "UTF-8";
     let utf8string = unicodeConverter.ConvertToUnicode(observer.buffer);
     utf8string += unicodeConverter.Finish();
     payload = JSON.parse(utf8string);
   } else {
--- a/toolkit/components/url-classifier/UrlClassifierHashCompleter.jsm
+++ b/toolkit/components/url-classifier/UrlClassifierHashCompleter.jsm
@@ -748,17 +748,17 @@ HashCompleterRequest.prototype = {
   notifyFailure: function HCR_notifyFailure(aStatus) {
     log("notifying failure\n");
     for (let i = 0; i < this._requests.length; i++) {
       let request = this._requests[i];
       request.callback.completionFinished(aStatus);
     }
   },
 
-  onDataAvailable: function HCR_onDataAvailable(aRequest, aContext,
+  onDataAvailable: function HCR_onDataAvailable(aRequest,
                                                 aInputStream, aOffset, aCount) {
     let sis = Cc["@mozilla.org/scriptableinputstream;1"].
               createInstance(Ci.nsIScriptableInputStream);
     sis.init(aInputStream);
     this._response += sis.readBytes(aCount);
   },
 
   onStartRequest: function HCR_onStartRequest(aRequest) {
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -1865,17 +1865,16 @@ ThreatHitReportListener::OnStartRequest(
        errorName.get(), requestStatus, NS_ConvertUTF16toUTF8(trimmed).get(),
        this));
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ThreatHitReportListener::OnDataAvailable(nsIRequest* aRequest,
-                                         nsISupports* aContext,
                                          nsIInputStream* aInputStream,
                                          uint64_t aOffset, uint32_t aCount) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ThreatHitReportListener::OnStopRequest(nsIRequest* aRequest,
                                        nsresult aStatus) {
--- a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
@@ -658,17 +658,16 @@ nsUrlClassifierStreamUpdater::OnStartReq
 
   mStreamTable.Truncate();
 
   return status;
 }
 
 NS_IMETHODIMP
 nsUrlClassifierStreamUpdater::OnDataAvailable(nsIRequest *request,
-                                              nsISupports *context,
                                               nsIInputStream *aIStream,
                                               uint64_t aSourceOffset,
                                               uint32_t aLength) {
   if (!mDBService) return NS_ERROR_NOT_INITIALIZED;
 
   LOG(("OnDataAvailable (%d bytes)", aLength));
 
   if (aSourceOffset > MAX_FILE_SIZE) {
--- a/toolkit/components/utils/SimpleServices.jsm
+++ b/toolkit/components/utils/SimpleServices.jsm
@@ -89,30 +89,30 @@ AddonLocalizationConverter.prototype = {
     this.listener = aListener;
   },
 
   onStartRequest(aRequest) {
     this.parts = [];
     this.decoder = new TextDecoder();
   },
 
-  onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) {
+  onDataAvailable(aRequest, aInputStream, aOffset, aCount) {
     let bytes = NetUtil.readInputStream(aInputStream, aCount);
     this.parts.push(this.decoder.decode(bytes, {stream: true}));
   },
 
   onStopRequest(aRequest, aStatusCode) {
     try {
       this.listener.onStartRequest(aRequest, null);
       if (Components.isSuccessCode(aStatusCode)) {
         this.parts.push(this.decoder.decode());
         let string = this.parts.join("");
         let stream = this.convertToStream(this.addon, string);
 
-        this.listener.onDataAvailable(aRequest, null, stream, 0, stream.available());
+        this.listener.onDataAvailable(aRequest, stream, 0, stream.available());
       }
     } catch (e) {
       aStatusCode = e.result || Cr.NS_ERROR_FAILURE;
     }
     this.listener.onStopRequest(aRequest, aStatusCode);
   },
 };
 
--- a/toolkit/modules/secondscreen/RokuApp.jsm
+++ b/toolkit/modules/secondscreen/RokuApp.jsm
@@ -156,17 +156,17 @@ function RemoteMedia(url, listener) {
   this._pump.init(this._inputStream, 0, 0, true);
   this._pump.asyncRead(this, null);
 }
 
 RemoteMedia.prototype = {
   onStartRequest(request) {
   },
 
-  onDataAvailable(request, context, stream, offset, count) {
+  onDataAvailable(request, stream, offset, count) {
     this._scriptableStream.init(stream);
     let data = this._scriptableStream.read(count);
     if (!data) {
       return;
     }
 
     let msg = JSON.parse(data);
     if (this._status === msg._s) {
--- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
@@ -1952,17 +1952,17 @@ var DownloadAddonInstall = class extends
     }
   }
 
   /*
    * Update the crypto hasher with the new data and call the progress listeners.
    *
    * @see nsIStreamListener
    */
-  onDataAvailable(aRequest, aContext, aInputstream, aOffset, aCount) {
+  onDataAvailable(aRequest, aInputstream, aOffset, aCount) {
     this.crypto.updateFromStream(aInputstream, aCount);
     this.progress += aCount;
     if (!this._callInstallListeners("onDownloadProgress")) {
       // TODO cancel the download and make it available again (bug 553024)
     }
   }
 
   /*
--- a/uriloader/base/nsURILoader.cpp
+++ b/uriloader/base/nsURILoader.cpp
@@ -328,26 +328,26 @@ nsDocumentOpenInfo::CheckListenerChain()
       ("[0x%p] nsDocumentOpenInfo::CheckListenerChain %s listener %p rv "
        "%" PRIx32,
        this, (NS_SUCCEEDED(rv) ? "success" : "failure"),
        (nsIStreamListener*)m_targetStreamListener, static_cast<uint32_t>(rv)));
   return rv;
 }
 
 NS_IMETHODIMP
-nsDocumentOpenInfo::OnDataAvailable(nsIRequest* request, nsISupports* aCtxt,
+nsDocumentOpenInfo::OnDataAvailable(nsIRequest* request,
                                     nsIInputStream* inStr,
                                     uint64_t sourceOffset, uint32_t count) {
   // if we have retarged to the end stream listener, then forward the call....
   // otherwise, don't do anything
 
   nsresult rv = NS_OK;
 
   if (m_targetStreamListener)
-    rv = m_targetStreamListener->OnDataAvailable(request, aCtxt, inStr,
+    rv = m_targetStreamListener->OnDataAvailable(request, inStr,
                                                  sourceOffset, count);
   return rv;
 }
 
 NS_IMETHODIMP nsDocumentOpenInfo::OnStopRequest(nsIRequest* request,
                                                 nsresult aStatus) {
   LOG(("[0x%p] nsDocumentOpenInfo::OnStopRequest", this));
 
--- a/uriloader/exthandler/ExternalHelperAppChild.cpp
+++ b/uriloader/exthandler/ExternalHelperAppChild.cpp
@@ -22,17 +22,17 @@ NS_IMPL_ISUPPORTS(ExternalHelperAppChild
 ExternalHelperAppChild::ExternalHelperAppChild() : mStatus(NS_OK) {}
 
 ExternalHelperAppChild::~ExternalHelperAppChild() {}
 
 //-----------------------------------------------------------------------------
 // nsIStreamListener
 //-----------------------------------------------------------------------------
 NS_IMETHODIMP
-ExternalHelperAppChild::OnDataAvailable(nsIRequest *request, nsISupports *ctx,
+ExternalHelperAppChild::OnDataAvailable(nsIRequest *request,
                                         nsIInputStream *input, uint64_t offset,
                                         uint32_t count) {
   if (NS_FAILED(mStatus)) return mStatus;
 
   static uint32_t const kCopyChunkSize = 128 * 1024;
   uint32_t toRead = std::min<uint32_t>(count, kCopyChunkSize);
 
   nsCString data;
--- a/uriloader/exthandler/ExternalHelperAppParent.cpp
+++ b/uriloader/exthandler/ExternalHelperAppParent.cpp
@@ -151,17 +151,17 @@ mozilla::ipc::IPCResult ExternalHelperAp
   MOZ_ASSERT(mPending, "must be pending!");
 
   nsCOMPtr<nsIInputStream> stringStream;
   DebugOnly<nsresult> rv =
       NS_NewByteInputStream(getter_AddRefs(stringStream),
                             MakeSpan(data).To(count), NS_ASSIGNMENT_DEPEND);
   NS_ASSERTION(NS_SUCCEEDED(rv), "failed to create dependent string!");
   mStatus =
-      mListener->OnDataAvailable(this, nullptr, stringStream, offset, count);
+      mListener->OnDataAvailable(this, stringStream, offset, count);
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult ExternalHelperAppParent::RecvOnStopRequest(
     const nsresult& code) {
   MOZ_ASSERT(!mDiverted,
              "child forwarding callbacks after request was diverted");
@@ -187,21 +187,21 @@ mozilla::ipc::IPCResult ExternalHelperAp
   return IPC_OK();
 }
 
 //
 // nsIStreamListener
 //
 
 NS_IMETHODIMP
-ExternalHelperAppParent::OnDataAvailable(nsIRequest* request, nsISupports* ctx,
+ExternalHelperAppParent::OnDataAvailable(nsIRequest* request,
                                          nsIInputStream* input, uint64_t offset,
                                          uint32_t count) {
   MOZ_ASSERT(mDiverted);
-  return mListener->OnDataAvailable(request, ctx, input, offset, count);
+  return mListener->OnDataAvailable(request, input, offset, count);
 }
 
 NS_IMETHODIMP
 ExternalHelperAppParent::OnStartRequest(nsIRequest* request) {
   MOZ_ASSERT(mDiverted);
   return mListener->OnStartRequest(request);
 }
 
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -1880,32 +1880,32 @@ void nsExternalAppHandler::SendStatusCha
           prompter->Alert(title.get(), msgText.get());
         }
       }
     }
   }
 }
 
 NS_IMETHODIMP
-nsExternalAppHandler::OnDataAvailable(nsIRequest* request, nsISupports* aCtxt,
+nsExternalAppHandler::OnDataAvailable(nsIRequest* request,
                                       nsIInputStream* inStr,
                                       uint64_t sourceOffset, uint32_t count) {
   nsresult rv = NS_OK;
   // first, check to see if we've been canceled....
   if (mCanceled || !mSaver) {
     // then go cancel our underlying channel too
     return request->Cancel(NS_BINDING_ABORTED);
   }
 
   // read the data out of the stream and write it to the temp file.
   if (count > 0) {
     mProgress += count;
 
     nsCOMPtr<nsIStreamListener> saver = do_QueryInterface(mSaver);
-    rv = saver->OnDataAvailable(request, aCtxt, inStr, sourceOffset, count);
+    rv = saver->OnDataAvailable(request, inStr, sourceOffset, count);
     if (NS_SUCCEEDED(rv)) {
       // Send progress notification.
       if (mTransfer) {
         mTransfer->OnProgressChange64(nullptr, request, mProgress,
                                       mContentLength, mProgress,
                                       mContentLength);
       }
     } else {
--- a/uriloader/exthandler/nsExternalProtocolHandler.cpp
+++ b/uriloader/exthandler/nsExternalProtocolHandler.cpp
@@ -430,17 +430,17 @@ NS_IMETHODIMP nsExtProtocolChannel::OnSt
 NS_IMETHODIMP nsExtProtocolChannel::OnStopRequest(nsIRequest *aRequest,
                                                   nsresult aStatusCode) {
   // no data is expected
   MOZ_CRASH("No data expected from external protocol channel");
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP nsExtProtocolChannel::OnDataAvailable(
-    nsIRequest *aRequest, nsISupports *aContext, nsIInputStream *aInputStream,
+    nsIRequest *aRequest, nsIInputStream *aInputStream,
     uint64_t aOffset, uint32_t aCount) {
   // no data is expected
   MOZ_CRASH("No data expected from external protocol channel");
   return NS_ERROR_UNEXPECTED;
 }
 
 ///////////////////////////////////////////////////////////////////////
 // the default protocol handler implementation
--- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp
+++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp
@@ -211,17 +211,17 @@ nsresult nsManifestCheck::Begin() {
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 nsManifestCheck::OnStartRequest(nsIRequest *aRequest) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsManifestCheck::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
+nsManifestCheck::OnDataAvailable(nsIRequest *aRequest,
                                  nsIInputStream *aStream, uint64_t aOffset,
                                  uint32_t aCount) {
   uint32_t bytesRead;
   aStream->ReadSegments(ReadManifest, this, aCount, &bytesRead);
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -394,17 +394,16 @@ NS_IMETHODIMP
 nsOfflineCacheUpdateItem::OnStartRequest(nsIRequest *aRequest) {
   mState = LoadStatus::RECEIVING;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOfflineCacheUpdateItem::OnDataAvailable(nsIRequest *aRequest,
-                                          nsISupports *aContext,
                                           nsIInputStream *aStream,
                                           uint64_t aOffset, uint32_t aCount) {
   uint32_t bytesRead = 0;
   aStream->ReadSegments(NS_DiscardSegment, nullptr, aCount, &bytesRead);
   mBytesRead += bytesRead;
   LOG(("loaded %u bytes into offline cache [offset=%" PRIu64 "]\n", bytesRead,
        aOffset));
 
@@ -1056,17 +1055,16 @@ nsOfflineManifestItem::OnStartRequest(ns
   rv = GetOldManifestContentHash(aRequest);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return nsOfflineCacheUpdateItem::OnStartRequest(aRequest);
 }
 
 NS_IMETHODIMP
 nsOfflineManifestItem::OnDataAvailable(nsIRequest *aRequest,
-                                       nsISupports *aContext,
                                        nsIInputStream *aStream,
                                        uint64_t aOffset, uint32_t aCount) {
   uint32_t bytesRead = 0;
   aStream->ReadSegments(ReadManifest, this, aCount, &bytesRead);
   mBytesRead += bytesRead;
 
   if (mParserState == PARSE_ERROR) {
     LOG(("OnDataAvailable is canceling the request due a parse error\n"));
--- a/uriloader/prefetch/nsPrefetchService.cpp
+++ b/uriloader/prefetch/nsPrefetchService.cpp
@@ -227,17 +227,17 @@ nsPrefetchNode::OnStartRequest(nsIReques
       return NS_BINDING_ABORTED;
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrefetchNode::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
+nsPrefetchNode::OnDataAvailable(nsIRequest *aRequest,
                                 nsIInputStream *aStream, uint64_t aOffset,
                                 uint32_t aCount) {
   uint32_t bytesRead = 0;
   aStream->ReadSegments(NS_DiscardSegment, nullptr, aCount, &bytesRead);
   mBytesRead += bytesRead;
   LOG(("prefetched %u bytes [offset=%" PRIu64 "]\n", bytesRead, aOffset));
   return NS_OK;
 }
--- a/widget/android/WebExecutorSupport.cpp
+++ b/widget/android/WebExecutorSupport.cpp
@@ -202,17 +202,17 @@ class LoaderListener final : public nsIS
                 nsresult aStatusCode) override {
     if (mStream) {
       mStream->SendEof();
     }
     return NS_OK;
   }
 
   NS_IMETHOD
-  OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
+  OnDataAvailable(nsIRequest* aRequest,
                   nsIInputStream* aInputStream, uint64_t aOffset,
                   uint32_t aCount) override {
     MOZ_ASSERT(mStream);
 
     // We only need this for the ReadSegments call, the value is unused.
     uint32_t countRead;
     return aInputStream->ReadSegments(WriteSegment, this, aCount, &countRead);
   }
--- a/widget/windows/nsDataObj.cpp
+++ b/widget/windows/nsDataObj.cpp
@@ -99,17 +99,17 @@ STDMETHODIMP nsDataObj::CStream::QueryIn
   }
 
   return E_NOINTERFACE;
 }
 
 // nsIStreamListener implementation
 NS_IMETHODIMP
 nsDataObj::CStream::OnDataAvailable(
-    nsIRequest* aRequest, nsISupports* aContext, nsIInputStream* aInputStream,
+    nsIRequest* aRequest, nsIInputStream* aInputStream,
     uint64_t aOffset,  // offset within the stream
     uint32_t aCount)   // bytes available on this call
 {
   // Extend the write buffer for the incoming data.
   uint8_t* buffer = mChannelData.AppendElements(aCount, fallible);
   if (!buffer) {
     return NS_ERROR_OUT_OF_MEMORY;
   }