Bug 1525319 - Changing js to remove context from onStartRequest and onStopRequest r=valentin
authorJonathan Kingston <jkt@mozilla.com>
Wed, 27 Feb 2019 23:41:54 +0000
changeset 519442 2f665c88b0c8c0f6502088c4866778ea5e3fc0cb
parent 519441 c48f47f793c0f0d9b4acf2caf9324b8bd7a5a683
child 519443 20fcf9d9494ac77d9c8166444e5fa8346ff13be1
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [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 - Changing js to remove context from onStartRequest and onStopRequest r=valentin Differential Revision: https://phabricator.services.mozilla.com/D20771
browser/base/content/aboutDialog-appUpdater.js
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/shared/webconsole/test/unit/test_throttle.js
devtools/shared/webconsole/throttle.js
dom/base/test/chrome/test_bug682305.html
dom/media/IdpSandbox.jsm
dom/push/PushServiceHttp2.jsm
dom/security/test/unit/test_csp_upgrade_insecure_request_header.js
image/test/unit/image_load_helpers.js
mobile/android/chrome/content/CastingApps.js
modules/libjar/test/unit/test_jarchannel.js
modules/libjar/zipwriter/test/unit/test_asyncadd.js
modules/libjar/zipwriter/test/unit/test_asyncbadadd.js
modules/libjar/zipwriter/test/unit/test_asyncbadremove.js
modules/libjar/zipwriter/test/unit/test_asyncremove.js
modules/libjar/zipwriter/test/unit/test_bug399727.js
modules/libjar/zipwriter/test/unit/test_bug717061.js
netwerk/base/NetUtil.jsm
netwerk/test/browser/browser_cross_process_redirect.js
netwerk/test/httpserver/httpd.js
netwerk/test/httpserver/test/head_utils.js
netwerk/test/httpserver/test/test_async_response_sending.js
netwerk/test/httpserver/test/test_basic_functionality.js
netwerk/test/httpserver/test/test_byte_range.js
netwerk/test/httpserver/test/test_cern_meta.js
netwerk/test/httpserver/test/test_default_index_handler.js
netwerk/test/httpserver/test/test_empty_body.js
netwerk/test/httpserver/test/test_errorhandler_exception.js
netwerk/test/httpserver/test/test_header_array.js
netwerk/test/httpserver/test/test_name_scheme.js
netwerk/test/httpserver/test/test_processasync.js
netwerk/test/httpserver/test/test_qi.js
netwerk/test/httpserver/test/test_registerdirectory.js
netwerk/test/httpserver/test/test_registerfile.js
netwerk/test/httpserver/test/test_response_write.js
netwerk/test/httpserver/test/test_setindexhandler.js
netwerk/test/httpserver/test/test_setstatusline.js
netwerk/test/httpserver/test/test_sjs.js
netwerk/test/httpserver/test/test_sjs_object_state.js
netwerk/test/httpserver/test/test_sjs_state.js
netwerk/test/httpserver/test/test_sjs_throwing_exceptions.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_auth_proxy.js
netwerk/test/unit/test_authentication.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_bug331825.js
netwerk/test/unit/test_bug369787.js
netwerk/test/unit/test_bug412945.js
netwerk/test/unit/test_bug455311.js
netwerk/test/unit/test_bug470716.js
netwerk/test/unit/test_bug482601.js
netwerk/test/unit/test_bug536324_64bit_content_length.js
netwerk/test/unit/test_bug561042.js
netwerk/test/unit/test_bug596443.js
netwerk/test/unit/test_bug618835.js
netwerk/test/unit/test_bug633743.js
netwerk/test/unit/test_bug667907.js
netwerk/test/unit/test_bug856978.js
netwerk/test/unit/test_cacheflags.js
netwerk/test/unit/test_content_length_underrun.js
netwerk/test/unit/test_content_sniffer.js
netwerk/test/unit/test_cookie_header.js
netwerk/test/unit/test_crossOriginOpenerPolicy.js
netwerk/test/unit/test_event_sink.js
netwerk/test/unit/test_file_protocol.js
netwerk/test/unit/test_freshconnection.js
netwerk/test/unit/test_getHost.js
netwerk/test/unit/test_http2.js
netwerk/test/unit/test_httpResponseTimeout.js
netwerk/test/unit/test_httpcancel.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_plaintext_sniff.js
netwerk/test/unit/test_predictor.js
netwerk/test/unit/test_progress.js
netwerk/test/unit/test_protocolproxyservice.js
netwerk/test/unit/test_proxyconnect.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_streamcopier.js
netwerk/test/unit/test_suspend_channel_before_connect.js
netwerk/test/unit/test_suspend_channel_on_authRetry.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_traceable_channel.js
netwerk/test/unit/test_trackingProtection_annotateChannels.js
services/common/rest.js
testing/specialpowers/content/specialpowersAPI.js
toolkit/components/downloads/DownloadCore.jsm
toolkit/components/downloads/test/unit/head.js
toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
toolkit/components/extensions/test/xpcshell/test_ext_webRequest_suspend.js
toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms_streamConverter.js
toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html
toolkit/components/places/PageIconProtocolHandler.jsm
toolkit/components/search/SearchService.jsm
toolkit/components/url-classifier/UrlClassifierHashCompleter.jsm
toolkit/components/utils/SimpleServices.jsm
toolkit/content/contentAreaUtils.js
toolkit/modules/secondscreen/RokuApp.jsm
toolkit/mozapps/extensions/internal/XPIInstall.jsm
toolkit/mozapps/update/UpdateService.jsm
toolkit/mozapps/update/content/updates.js
toolkit/mozapps/update/tests/chrome/test_0085_error_patchApplyFailure_partial_complete_staging.xul
toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
--- a/browser/base/content/aboutDialog-appUpdater.js
+++ b/browser/base/content/aboutDialog-appUpdater.js
@@ -320,23 +320,23 @@ appUpdater.prototype =
     if (this.aus) {
       this.aus.removeDownloadListener(this);
     }
   },
 
   /**
    * See nsIRequestObserver.idl
    */
-  onStartRequest(aRequest, aContext) {
+  onStartRequest(aRequest) {
   },
 
   /**
    * See nsIRequestObserver.idl
    */
-  onStopRequest(aRequest, aContext, aStatusCode) {
+  onStopRequest(aRequest, aStatusCode) {
     switch (aStatusCode) {
     case Cr.NS_ERROR_UNEXPECTED:
       if (this.update.selectedPatch.state == "download-failed" &&
           (this.update.isCompleteUpdate || this.update.patchCount != 2)) {
         // Verification error of complete patch, informational text is held in
         // the update object.
         this.removeDownloadListener();
         this.selectPanel("downloadFailed");
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -1101,17 +1101,17 @@ nsContextMenu.prototype = {
     // an object to proxy the data through to
     // nsIExternalHelperAppService.doContent, which will wait for the
     // appropriate MIME-type headers and then prompt the user with a
     // file picker
     function saveAsListener() {}
     saveAsListener.prototype = {
       extListener: null,
 
-      onStartRequest: function saveLinkAs_onStartRequest(aRequest, aContext) {
+      onStartRequest: function saveLinkAs_onStartRequest(aRequest) {
         // if the timer fired, the error status will have been caused by that,
         // and we'll be restarting in onStopRequest, so no reason to notify
         // the user
         if (aRequest.status == NS_ERROR_SAVE_LINK_AS_TIMEOUT)
           return;
 
         timer.cancel();
 
@@ -1132,29 +1132,29 @@ nsContextMenu.prototype = {
 
         let extHelperAppSvc =
           Cc["@mozilla.org/uriloader/external-helper-app-service;1"].
           getService(Ci.nsIExternalHelperAppService);
         let channel = aRequest.QueryInterface(Ci.nsIChannel);
         this.extListener =
           extHelperAppSvc.doContent(channel.contentType, aRequest,
                                     null, true, window);
-        this.extListener.onStartRequest(aRequest, aContext);
+        this.extListener.onStartRequest(aRequest);
       },
 
-      onStopRequest: function saveLinkAs_onStopRequest(aRequest, aContext,
+      onStopRequest: function saveLinkAs_onStopRequest(aRequest,
                                                        aStatusCode) {
         if (aStatusCode == NS_ERROR_SAVE_LINK_AS_TIMEOUT) {
           // do it the old fashioned way, which will pick the best filename
           // it can without waiting.
           saveURL(linkURL, linkText, dialogTitle, bypassCache, false, docURI,
                   doc, isContentWindowPrivate);
         }
         if (this.extListener)
-          this.extListener.onStopRequest(aRequest, aContext, aStatusCode);
+          this.extListener.onStopRequest(aRequest, aStatusCode);
       },
 
       onDataAvailable: function saveLinkAs_onDataAvailable(aRequest, aContext,
                                                            aInputStream,
                                                            aOffset, aCount) {
         this.extListener.onDataAvailable(aRequest, aContext, aInputStream,
                                          aOffset, aCount);
       },
--- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
+++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
@@ -272,28 +272,28 @@ class ChromeActions {
       channel.contentStream = aInputStream;
       if ("nsIPrivateBrowsingChannel" in Ci &&
           channel instanceof Ci.nsIPrivateBrowsingChannel) {
         channel.setPrivate(docIsPrivate);
       }
 
       var listener = {
         extListener: null,
-        onStartRequest(aRequest, aContext) {
+        onStartRequest(aRequest) {
           var loadContext = self.domWindow.docShell
                                 .QueryInterface(Ci.nsILoadContext);
           this.extListener = extHelperAppSvc.doContent(
             (data.isAttachment ? "application/octet-stream" :
                                  "application/pdf"),
             aRequest, loadContext, false);
-          this.extListener.onStartRequest(aRequest, aContext);
+          this.extListener.onStartRequest(aRequest);
         },
-        onStopRequest(aRequest, aContext, aStatusCode) {
+        onStopRequest(aRequest, aStatusCode) {
           if (this.extListener) {
-            this.extListener.onStopRequest(aRequest, aContext, aStatusCode);
+            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,
@@ -855,17 +855,17 @@ PdfStreamConverter.prototype = {
     var binaryStream = this.binaryStream;
     binaryStream.setInputStream(aInputStream);
     let chunk = new ArrayBuffer(aCount);
     binaryStream.readArrayBuffer(aCount, chunk);
     this.dataListener.append(new Uint8Array(chunk));
   },
 
   // nsIRequestObserver::onStartRequest
-  onStartRequest(aRequest, aContext) {
+  onStartRequest(aRequest) {
     // Setup the request so we can use it below.
     var isHttpRequest = false;
     try {
       aRequest.QueryInterface(Ci.nsIHttpChannel);
       isHttpRequest = true;
     } catch (e) {}
 
     var rangeRequest = false;
@@ -934,29 +934,29 @@ PdfStreamConverter.prototype = {
 
     var listener = this.listener;
     var dataListener = this.dataListener;
     // 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, context) {
-        listener.onStartRequest(aRequest, aContext);
+      onStartRequest(request) {
+        listener.onStartRequest(aRequest);
       },
       onDataAvailable(request, context, inputStream, offset, count) {
-        listener.onDataAvailable(aRequest, aContext, inputStream,
+        listener.onDataAvailable(aRequest, null, inputStream,
                                  offset, count);
       },
-      onStopRequest(request, context, statusCode) {
+      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, context, statusCode);
+          listener.onStopRequest(aRequest, statusCode);
           return;
         }
         var actions;
         if (rangeRequest || streamRequest) {
           actions = new RangedChromeActions(
             domWindow, contentDispositionFilename, aRequest,
             rangeRequest, streamRequest, dataListener);
         } else {
@@ -966,17 +966,17 @@ PdfStreamConverter.prototype = {
         var requestListener = new RequestListener(actions);
         domWindow.document.addEventListener(PDFJS_EVENT_ID, function(event) {
           requestListener.receive(event);
         }, false, true);
         if (actions.supportsIntegratedFind()) {
           var findEventManager = new FindEventManager(domWindow);
           findEventManager.bind();
         }
-        listener.onStopRequest(aRequest, aContext, statusCode);
+        listener.onStopRequest(aRequest, statusCode);
 
         if (domWindow.frameElement) {
           var isObjectEmbed = domWindow.frameElement.tagName !== "IFRAME" ||
             domWindow.frameElement.className === "previewPluginContentFrame";
           PdfJsTelemetry.onEmbed(isObjectEmbed);
         }
       },
     };
@@ -994,17 +994,17 @@ PdfStreamConverter.prototype = {
       Services.scriptSecurityManager.createCodebasePrincipal(uri,
         aRequest.loadInfo.originAttributes);
     aRequest.owner = resourcePrincipal;
 
     channel.asyncOpen(proxy);
   },
 
   // nsIRequestObserver::onStopRequest
-  onStopRequest(aRequest, aContext, aStatusCode) {
+  onStopRequest(aRequest, aStatusCode) {
     if (!this.dataListener) {
       // Do nothing
       return;
     }
 
     if (Components.isSuccessCode(aStatusCode)) {
       this.dataListener.finish();
     } else {
--- a/browser/modules/FaviconLoader.jsm
+++ b/browser/modules/FaviconLoader.jsm
@@ -155,32 +155,32 @@ class FaviconLoad {
   cancel() {
     if (!this.channel) {
       return;
     }
 
     this.channel.cancel(Cr.NS_BINDING_ABORTED);
   }
 
-  onStartRequest(request, context) {
+  onStartRequest(request) {
   }
 
   onDataAvailable(request, context, inputStream, offset, count) {
     this.stream.writeFrom(inputStream, count);
   }
 
   asyncOnChannelRedirect(oldChannel, newChannel, flags, callback) {
     if (oldChannel == this.channel) {
       this.channel = newChannel;
     }
 
     callback.onRedirectVerifyCallback(Cr.NS_OK);
   }
 
-  async onStopRequest(request, context, statusCode) {
+  async onStopRequest(request, statusCode) {
     if (request != this.channel) {
       // Indicates that a redirect has occurred. We don't care about the result
       // of the original channel.
       return;
     }
 
     this.stream.close();
     this.stream = null;
--- a/devtools/client/jsonview/converter-child.js
+++ b/devtools/client/jsonview/converter-child.js
@@ -70,17 +70,17 @@ Converter.prototype = {
 
   onDataAvailable: function(request, context, inputStream, offset, count) {
     // Decode and insert data.
     const buffer = new ArrayBuffer(count);
     new BinaryInput(inputStream).readArrayBuffer(count, buffer);
     this.decodeAndInsertBuffer(buffer);
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     // Set the content type to HTML in order to parse the doctype, styles
     // and scripts. The JSON will be manually inserted as text.
     request.QueryInterface(Ci.nsIChannel);
     request.contentType = "text/html";
 
     const headers = getHttpHeaders(request);
 
     // Enforce strict CSP:
@@ -100,37 +100,37 @@ Converter.prototype = {
     fixSave(request);
 
     // Because content might still have a reference to this window,
     // force setting it to a null principal to avoid it being same-
     // origin with (other) content.
     request.loadInfo.resetPrincipalToInheritToNullPrincipal();
 
     // Start the request.
-    this.listener.onStartRequest(request, context);
+    this.listener.onStartRequest(request);
 
     // Initialize stuff.
     const win = NetworkHelper.getWindowForRequest(request);
     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, context, stream, 0, stream.available());
+    this.listener.onDataAvailable(request, null, stream, 0, stream.available());
   },
 
-  onStopRequest: function(request, context, statusCode) {
+  onStopRequest: function(request, statusCode) {
     // Flush data.
     this.decodeAndInsertBuffer(new ArrayBuffer(0), true);
 
     // Stop the request.
-    this.listener.onStopRequest(request, context, statusCode);
+    this.listener.onStopRequest(request, statusCode);
     this.listener = null;
     this.decoder = null;
     this.data = null;
   },
 
   // Decodes an ArrayBuffer into a string and inserts it into the page.
   decodeAndInsertBuffer: function(buffer, flush = false) {
     // Decode the buffer into a string.
--- a/devtools/client/netmonitor/test/sjs_content-type-test-server.sjs
+++ b/devtools/client/netmonitor/test/sjs_content-type-test-server.sjs
@@ -10,19 +10,19 @@ function gzipCompressString(string, obs)
   let listener = Cc["@mozilla.org/network/stream-loader;1"]
                 .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.onStartRequest(null);
   converter.onDataAvailable(null, null, stringStream, 0, string.length);
-  converter.onStopRequest(null, null, null);
+  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/shared/webconsole/test/unit/test_throttle.js
+++ b/devtools/shared/webconsole/test/unit/test_throttle.js
@@ -93,17 +93,17 @@ add_task(async function() {
 
   const listener = throttler.manage(downloadChannel);
   equal(downloadChannel.state, "listener",
      "NetworkThrottleManager called setNewListener");
 
   equal(testListener.state, "initial", "test listener in initial state");
 
   // This method must be passed through immediately.
-  listener.onStartRequest(null, null);
+  listener.onStartRequest(null);
   equal(testListener.state, "start", "test listener started");
 
   const TEST_INPUT = "hi bob";
 
   const testStream = Cc["@mozilla.org/storagestream;1"]
       .createInstance(Ci.nsIStorageStream);
   testStream.init(512, 512);
   const out = testStream.getOutputStream(0);
@@ -132,12 +132,12 @@ add_task(async function() {
   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");
   equal(activitySeen, true, "activity has been distributed");
 
   const onChange = testListener.onStateChanged();
-  listener.onStopRequest(null, null, null);
+  listener.onStopRequest(null, null);
   newState = await onChange;
   equal(newState, "stop", "onStateChanged reported");
 });
--- a/devtools/shared/webconsole/throttle.js
+++ b/devtools/shared/webconsole/throttle.js
@@ -54,26 +54,26 @@ NetworkThrottleListener.prototype = {
    */
   setOriginalListener: function(originalListener) {
     this.originalListener = originalListener;
   },
 
   /**
    * @see nsIStreamListener.onStartRequest.
    */
-  onStartRequest: function(request, context) {
-    this.originalListener.onStartRequest(request, context);
+  onStartRequest: function(request) {
+    this.originalListener.onStartRequest(request);
     this.queue.start(this);
   },
 
   /**
    * @see nsIStreamListener.onStopRequest.
    */
-  onStopRequest: function(request, context, statusCode) {
-    this.pendingData.push({request, context, statusCode});
+  onStopRequest: function(request, statusCode) {
+    this.pendingData.push({request, statusCode});
     this.queue.dataAvailable(this);
   },
 
   /**
    * @see nsIStreamListener.onDataAvailable.
    */
   onDataAvailable: function(request, context, inputStream, offset, count) {
     if (this.pendingException) {
@@ -109,17 +109,17 @@ NetworkThrottleListener.prototype = {
       // Shouldn't happen.
       return {length: 0, done: true};
     }
 
     const {request, context, stream, count, statusCode} = this.pendingData[0];
 
     if (statusCode !== undefined) {
       this.pendingData.shift();
-      this.originalListener.onStopRequest(request, context, statusCode);
+      this.originalListener.onStopRequest(request, statusCode);
       return {length: 0, done: true};
     }
 
     if (bytesPermitted > count) {
       bytesPermitted = count;
     }
 
     try {
--- a/dom/base/test/chrome/test_bug682305.html
+++ b/dom/base/test/chrome/test_bug682305.html
@@ -53,23 +53,23 @@ CustomChannel.prototype = {
   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, context);
+      outListener.onStartRequest(this);
     } catch (e) {}
     try {
       outListener.onDataAvailable(this, context, stream, 0, stream.available());
     } catch (e) {}
     try {
-      outListener.onStopRequest(this, context, Cr.NS_OK);
+      outListener.onStopRequest(this, Cr.NS_OK);
     } catch (e) {}
   },
   open() {
     // throws an error if security checks fail
     contentSecManager.performSecurityCheck(this, null);
 
     let data = "bar";
     let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.nsIStringInputStream);
--- a/dom/media/IdpSandbox.jsm
+++ b/dom/media/IdpSandbox.jsm
@@ -53,19 +53,19 @@ ResourceLoader.load = function(uri, doc)
 ResourceLoader.prototype = {
   onDataAvailable(request, context, input, offset, count) {
     let stream = Cc["@mozilla.org/scriptableinputstream;1"]
       .createInstance(Ci.nsIScriptableInputStream);
     stream.init(input);
     this.data += stream.read(count);
   },
 
-  onStartRequest(request, context) {},
+  onStartRequest(request) {},
 
-  onStopRequest(request, context, status) {
+  onStopRequest(request, status) {
     if (Components.isSuccessCode(status)) {
       var statusCode = request.QueryInterface(Ci.nsIHttpChannel).responseStatus;
       if (statusCode === 200) {
         this.resolve({ request, data: this.data });
       } else {
         this.reject(new Error("Non-200 response from server: " + statusCode));
       }
     } else {
--- a/dom/push/PushServiceHttp2.jsm
+++ b/dom/push/PushServiceHttp2.jsm
@@ -51,17 +51,17 @@ PushSubscriptionListener.prototype = {
 
   QueryInterface: ChromeUtils.generateQI(["nsIHttpPushListener",
                                          "nsIStreamListener"]),
 
   getInterface: function(aIID) {
     return this.QueryInterface(aIID);
   },
 
-  onStartRequest: function(aRequest, aContext) {
+  onStartRequest: function(aRequest) {
     console.debug("PushSubscriptionListener: onStartRequest()");
     // We do not do anything here.
   },
 
   onDataAvailable: function(aRequest, aContext, aStream, aOffset, aCount) {
     console.debug("PushSubscriptionListener: onDataAvailable()");
     // Nobody should send data, but just to be sure, otherwise necko will
     // complain.
@@ -71,17 +71,17 @@ PushSubscriptionListener.prototype = {
 
     let inputStream = Cc["@mozilla.org/scriptableinputstream;1"]
                         .createInstance(Ci.nsIScriptableInputStream);
 
     inputStream.init(aStream);
     var data = inputStream.read(aCount);
   },
 
-  onStopRequest: function(aRequest, aContext, aStatusCode) {
+  onStopRequest: function(aRequest, aStatusCode) {
     console.debug("PushSubscriptionListener: onStopRequest()");
     if (!this._pushService) {
         return;
     }
 
     this._pushService.connOnStop(aRequest,
                                  Components.isSuccessCode(aStatusCode),
                                  this.uri);
@@ -106,17 +106,17 @@ var PushChannelListener = function(pushS
   console.debug("PushChannelListener()");
   this._mainListener = pushSubscriptionListener;
   this._message = [];
   this._ackUri = null;
 };
 
 PushChannelListener.prototype = {
 
-  onStartRequest: function(aRequest, aContext) {
+  onStartRequest: function(aRequest) {
     this._ackUri = aRequest.URI.spec;
   },
 
   onDataAvailable: function(aRequest, aContext, aStream, aOffset, aCount) {
     console.debug("PushChannelListener: onDataAvailable()");
 
     if (aCount === 0) {
       return;
@@ -126,17 +126,17 @@ PushChannelListener.prototype = {
                         .createInstance(Ci.nsIBinaryInputStream);
 
     inputStream.setInputStream(aStream);
     let chunk = new ArrayBuffer(aCount);
     inputStream.readArrayBuffer(aCount, chunk);
     this._message.push(chunk);
   },
 
-  onStopRequest: function(aRequest, aContext, aStatusCode) {
+  onStopRequest: function(aRequest, aStatusCode) {
     console.debug("PushChannelListener: onStopRequest()", "status code",
       aStatusCode);
     if (Components.isSuccessCode(aStatusCode) &&
         this._mainListener &&
         this._mainListener._pushService) {
       let headers = {
         encryption_key: getHeaderField(aRequest, "Encryption-Key"),
         crypto_key: getHeaderField(aRequest, "Crypto-Key"),
@@ -164,33 +164,33 @@ function getHeaderField(aRequest, name) 
 
 var PushServiceDelete = function(resolve, reject) {
   this._resolve = resolve;
   this._reject = reject;
 };
 
 PushServiceDelete.prototype = {
 
-  onStartRequest: function(aRequest, aContext) {},
+  onStartRequest: function(aRequest) {},
 
   onDataAvailable: function(aRequest, aContext, 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);
 
     inputStream.init(aStream);
     var data = inputStream.read(aCount);
   },
 
-  onStopRequest: function(aRequest, aContext, aStatusCode) {
+  onStopRequest: function(aRequest, aStatusCode) {
 
     if (Components.isSuccessCode(aStatusCode)) {
        this._resolve();
     } else {
        this._reject(new Error("Error removing subscription: " + aStatusCode));
     }
   }
 };
@@ -205,17 +205,17 @@ var SubscriptionListener = function(aSub
   this._serverURI = aServerURI;
   this._service = aPushServiceHttp2;
   this._ctime = Date.now();
   this._retryTimeoutID = null;
 };
 
 SubscriptionListener.prototype = {
 
-  onStartRequest: function(aRequest, aContext) {},
+  onStartRequest: function(aRequest) {},
 
   onDataAvailable: function(aRequest, aContext, 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;
@@ -223,17 +223,17 @@ SubscriptionListener.prototype = {
 
     let inputStream = Cc["@mozilla.org/scriptableinputstream;1"]
                         .createInstance(Ci.nsIScriptableInputStream);
 
     inputStream.init(aStream);
     this._data.concat(inputStream.read(aCount));
   },
 
-  onStopRequest: function(aRequest, aContext, aStatus) {
+  onStopRequest: function(aRequest, aStatus) {
     console.debug("SubscriptionListener: onStopRequest()");
 
     // Check if pushService is still active.
     if (!this._service.hasmainPushService()) {
       this._reject(new Error("Push service unavailable"));
       return;
     }
 
--- a/dom/security/test/unit/test_csp_upgrade_insecure_request_header.js
+++ b/dom/security/test/unit/test_csp_upgrade_insecure_request_header.js
@@ -40,21 +40,21 @@ var tests = [
     contentType: Ci.nsIContentPolicy.TYPE_IMAGE,
   },
 ];
 
 function ChannelListener() {
 }
 
 ChannelListener.prototype = {
-  onStartRequest(request, context) { },
+  onStartRequest(request) { },
   onDataAvailable(request, context, stream, offset, count) {
     do_throw("Should not get any data!");
   },
-  onStopRequest(request, context, status) {
+  onStopRequest(request, status) {
     var upgrade_insecure_header = false;
     try {
       if (request.getRequestHeader("Upgrade-Insecure-Requests")) {
         upgrade_insecure_header = true;
       }
     } catch (e) {
       // exception is thrown if header is not available on the request
     }
--- a/image/test/unit/image_load_helpers.js
+++ b/image/test/unit/image_load_helpers.js
@@ -78,36 +78,36 @@ function ImageListener(start_callback, s
 
 function NS_FAILED(val)
 {
   return !!(val & 0x80000000);
 }
 
 function ChannelListener()
 {
-  this.onStartRequest = function onStartRequest(aRequest, aContext)
+  this.onStartRequest = function onStartRequest(aRequest)
   {
     if (this.outputListener)
-      this.outputListener.onStartRequest(aRequest, aContext);
+      this.outputListener.onStartRequest(aRequest);
 
     this.requestStatus |= START_REQUEST;
   }
 
   this.onDataAvailable = function onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount)
   {
     if (this.outputListener)
       this.outputListener.onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount);
 
     this.requestStatus |= DATA_AVAILABLE;
   }
 
-  this.onStopRequest = function onStopRequest(aRequest, aContext, aStatusCode)
+  this.onStopRequest = function onStopRequest(aRequest, aStatusCode)
   {
     if (this.outputListener)
-      this.outputListener.onStopRequest(aRequest, aContext, aStatusCode);
+      this.outputListener.onStopRequest(aRequest, aStatusCode);
 
     // If we failed (or were canceled - failure is implied if canceled),
     // there's no use tracking our state, since it's meaningless.
     if (NS_FAILED(aStatusCode))
       this.requestStatus = 0;
     else
       this.requestStatus |= STOP_REQUEST;
   }
--- a/mobile/android/chrome/content/CastingApps.js
+++ b/mobile/android/chrome/content/CastingApps.js
@@ -337,32 +337,32 @@ var CastingApps = {
         contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_VIDEO,
       });
     } catch (e) {
      aCallback(null);
      return;
     }
 
     let listener = {
-      onStartRequest: function(request, context) {
+      onStartRequest: function(request) {
         switch (channel.responseStatus) {
           case 301:
           case 302:
           case 303:
             request.cancel(0);
             let location = channel.getResponseHeader("Location");
             CastingApps._getContentTypeForURI(CastingApps.makeURI(location), aElement, aCallback);
             break;
           default:
             aCallback(channel.contentType);
             request.cancel(0);
             break;
         }
       },
-      onStopRequest: function(request, context, statusCode) {},
+      onStopRequest: function(request, statusCode) {},
       onDataAvailable: function(request, context, stream, offset, count) {},
     };
 
     if (channel) {
       channel.asyncOpen(listener);
     } else {
       aCallback(null);
     }
--- a/modules/libjar/test/unit/test_jarchannel.js
+++ b/modules/libjar/test/unit/test_jarchannel.js
@@ -39,20 +39,20 @@ Listener.prototype = {
             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);
         }
     },
-    onStartRequest(request, ctx) {
+    onStartRequest(request) {
         this.gotStartRequest = true;
     },
-    onStopRequest(request, ctx, status) {
+    onStopRequest(request, status) {
         this.gotStopRequest = true;
         Assert.equal(status, 0);
         if (this._callback) {
             this._callback.call(null, this);
         }
     },
 };
 
--- a/modules/libjar/zipwriter/test/unit/test_asyncadd.js
+++ b/modules/libjar/zipwriter/test/unit/test_asyncadd.js
@@ -17,20 +17,20 @@ var TESTS = [
     size: 3402,
     crc: 0x504a5c30,
   },
 ];
 
 var size = 0;
 
 var observer = {
-  onStartRequest(request, context) {
+  onStartRequest(request) {
   },
 
-  onStopRequest(request, context, status) {
+  onStopRequest(request, status) {
     Assert.equal(status, Cr.NS_OK);
 
     zipW.close();
     size += ZIP_EOCDR_HEADER_SIZE;
 
     Assert.equal(size, tmpFile.fileSize);
 
     // Test the stored data with the zipreader
--- a/modules/libjar/zipwriter/test/unit/test_asyncbadadd.js
+++ b/modules/libjar/zipwriter/test/unit/test_asyncbadadd.js
@@ -1,20 +1,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 const FILENAME = "missing.txt";
 
 var observer = {
-  onStartRequest(request, context) {
+  onStartRequest(request) {
   },
 
-  onStopRequest(request, context, status) {
+  onStopRequest(request, status) {
     Assert.equal(status, Cr.NS_ERROR_FILE_NOT_FOUND);
     zipW.close();
     Assert.equal(ZIP_EOCDR_HEADER_SIZE, tmpFile.fileSize);
     do_test_finished();
   },
 };
 
 function run_test() {
--- a/modules/libjar/zipwriter/test/unit/test_asyncbadremove.js
+++ b/modules/libjar/zipwriter/test/unit/test_asyncbadremove.js
@@ -1,20 +1,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 const FILENAME = "missing.txt";
 
 var observer = {
-  onStartRequest(request, context) {
+  onStartRequest(request) {
   },
 
-  onStopRequest(request, context, status) {
+  onStopRequest(request, status) {
     Assert.equal(status, Cr.NS_ERROR_FILE_NOT_FOUND);
     zipW.close();
     Assert.equal(ZIP_EOCDR_HEADER_SIZE, tmpFile.fileSize);
     do_test_finished();
   },
 };
 
 function run_test() {
--- a/modules/libjar/zipwriter/test/unit/test_asyncremove.js
+++ b/modules/libjar/zipwriter/test/unit/test_asyncremove.js
@@ -4,20 +4,20 @@
  */
 
 var TESTS = [
   "test.txt",
   "test.png",
 ];
 
 var observer = {
-  onStartRequest(request, context) {
+  onStartRequest(request) {
   },
 
-  onStopRequest(request, context, status) {
+  onStopRequest(request, status) {
     Assert.equal(status, Cr.NS_OK);
 
     zipW.close();
 
     // Empty zip file should just be the end of central directory marker
     var newTmpFile = tmpFile.clone();
     Assert.equal(newTmpFile.fileSize, ZIP_EOCDR_HEADER_SIZE);
     do_test_finished();
--- a/modules/libjar/zipwriter/test/unit/test_bug399727.js
+++ b/modules/libjar/zipwriter/test/unit/test_bug399727.js
@@ -16,20 +16,20 @@ function BinaryComparer(file, callback) 
 }
 
 BinaryComparer.prototype = {
   fileStream: null,
   offset: null,
   length: null,
   callback: null,
 
-  onStartRequest(aRequest, aContext) {
+  onStartRequest(aRequest) {
   },
 
-  onStopRequest(aRequest, aContext, aStatusCode) {
+  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) {
     var stream = Cc["@mozilla.org/binaryinputstream;1"].
--- a/modules/libjar/zipwriter/test/unit/test_bug717061.js
+++ b/modules/libjar/zipwriter/test/unit/test_bug717061.js
@@ -15,20 +15,20 @@ function BinaryComparer(file, callback) 
 }
 
 BinaryComparer.prototype = {
   fileStream: null,
   offset: null,
   length: null,
   callback: null,
 
-  onStartRequest(aRequest, aContext) {
+  onStartRequest(aRequest) {
   },
 
-  onStopRequest(aRequest, aContext, aStatusCode) {
+  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) {
     var stream = Cc["@mozilla.org/binaryinputstream;1"].
--- a/netwerk/base/NetUtil.jsm
+++ b/netwerk/base/NetUtil.jsm
@@ -60,18 +60,18 @@ var NetUtil = {
         copier.init(aSource, aSink,
                     null /* Default event target */,
                     0 /* Default length */,
                     true, true /* Auto-close */);
 
         var observer;
         if (aCallback) {
             observer = {
-                onStartRequest(aRequest, aContext) {},
-                onStopRequest(aRequest, aContext, aStatusCode) {
+                onStartRequest(aRequest) {},
+                onStopRequest(aRequest, aStatusCode) {
                     aCallback(aStatusCode);
                 },
             };
         } else {
             observer = null;
         }
 
         // start the copying
@@ -112,18 +112,18 @@ var NetUtil = {
         let pipe = Cc["@mozilla.org/pipe;1"].
                    createInstance(Ci.nsIPipe);
         pipe.init(true, true, 0, PR_UINT32_MAX, null);
 
         // Create a listener that will give data to the pipe's output stream.
         let listener = Cc["@mozilla.org/network/simple-stream-listener;1"].
                        createInstance(Ci.nsISimpleStreamListener);
         listener.init(pipe.outputStream, {
-            onStartRequest(aRequest, aContext) {},
-            onStopRequest(aRequest, aContext, aStatusCode) {
+            onStartRequest(aRequest) {},
+            onStopRequest(aRequest, aStatusCode) {
                 pipe.outputStream.close();
                 aCallback(pipe.inputStream, aStatusCode, aRequest);
             },
         });
 
         // Input streams are handled slightly differently from everything else.
         if (aSource instanceof Ci.nsIInputStream) {
             let pump = Cc["@mozilla.org/network/input-stream-pump;1"].
--- a/netwerk/test/browser/browser_cross_process_redirect.js
+++ b/netwerk/test/browser/browser_cross_process_redirect.js
@@ -117,23 +117,23 @@ add_task(async function() {
   info("Loading redirected URL");
   // Open the URL in the first process. We expect it to wind up in the second
   // process.
 
   // Define the child listener in the new channel.
   await ContentTask.spawn(browser2, null, async function(arg) {
     function ChannelListener(childListener) { this.childListener = childListener; }
     ChannelListener.prototype = {
-      onStartRequest: function(aRequest, aContext) {
+      onStartRequest: function(aRequest) {
         info("onStartRequest");
         let channel = aRequest.QueryInterface(Ci.nsIChannel);
         Assert.equal(channel.URI.spec, this.childListener.URI, "Make sure the channel has the proper URI");
         Assert.equal(channel.originalURI.spec, this.childListener.originalURI, "Make sure the originalURI is correct");
       },
-      onStopRequest: function(aRequest, aContext, aStatusCode) {
+      onStopRequest: function(aRequest, aStatusCode) {
         info("onStopRequest");
         Assert.equal(aStatusCode, Cr.NS_OK, "Check the status code");
         Assert.equal(this.gotData, true, "Check that the channel received data");
         if (this.childListener.onComplete) {
           this.childListener.onComplete();
         }
         this.childListener.resolve();
       },
--- a/netwerk/test/httpserver/httpd.js
+++ b/netwerk/test/httpserver/httpd.js
@@ -3714,21 +3714,21 @@ Response.prototype =
     var preamble = preambleData.join("");
 
     var responseHeadPipe = new Pipe(true, false, 0, PR_UINT32_MAX, null);
     responseHeadPipe.outputStream.write(preamble, preamble.length);
 
     var response = this;
     var copyObserver =
       {
-        onStartRequest(request, cx) {
+        onStartRequest(request) {
           dumpn("*** preamble copying started");
         },
 
-        onStopRequest(request, cx, statusCode) {
+        onStopRequest(request, statusCode) {
           dumpn("*** preamble copying complete " +
                 "[status=0x" + statusCode.toString(16) + "]");
 
           if (!Components.isSuccessCode(statusCode)) {
             dumpn("!!! header copying problems: non-success statusCode, " +
                   "ending response");
 
             response.end();
@@ -3765,21 +3765,21 @@ Response.prototype =
       dumpn("*** empty body, response finished");
       this.end();
       return;
     }
 
     var response = this;
     var copyObserver =
       {
-        onStartRequest(request, context) {
+        onStartRequest(request) {
           dumpn("*** onStartRequest");
         },
 
-        onStopRequest(request, cx, statusCode) {
+        onStopRequest(request, statusCode) {
           dumpn("*** onStopRequest [status=0x" + statusCode.toString(16) + "]");
 
           if (statusCode === Cr.NS_BINDING_ABORTED) {
             dumpn("*** terminating copy observer without ending the response");
           } else {
             if (!Components.isSuccessCode(statusCode))
               dumpn("*** WARNING: non-success statusCode in onStopRequest");
 
@@ -3878,17 +3878,17 @@ function WriteThroughCopier(source, sink
   /** Status of this request. */
   this.status = Cr.NS_OK;
 
   /** Arrays of byte strings waiting to be written to output. */
   this._pendingData = [];
 
   // start copying
   try {
-    observer.onStartRequest(this, context);
+    observer.onStartRequest(this);
     this._waitToReadData();
     this._waitForSinkClosure();
   } catch (e) {
     dumpn("!!! error starting copy: " + e +
           ("lineNumber" in e ? ", line " + e.lineNumber : ""));
     dumpn(e.stack);
     this.cancel(Cr.NS_ERROR_UNEXPECTED);
   }
@@ -4241,17 +4241,17 @@ WriteThroughCopier.prototype =
     var self = this;
     var event =
       {
         run() {
           dumpn("*** onStopRequest async callback");
 
           self._completed = true;
           try {
-            self._observer.onStopRequest(self, self._context, self.status);
+            self._observer.onStopRequest(self, self.status);
           } catch (e) {
             NS_ASSERT(false,
                       "how are we throwing an exception here?  we control " +
                       "all the callers!  " + e);
           }
         },
       };
 
--- a/netwerk/test/httpserver/test/head_utils.js
+++ b/netwerk/test/httpserver/test/head_utils.js
@@ -270,53 +270,53 @@ function runHttpTests(testArray, done) {
   /** Stream listener for the channels. */
   var listener =
     {
       /** Current channel being observed by this. */
       _channel: null,
       /** Array of bytes of data in body of response. */
       _data: [],
 
-      onStartRequest(request, cx) {
+      onStartRequest(request) {
         Assert.ok(request === this._channel);
         var ch = request.QueryInterface(Ci.nsIHttpChannel)
                         .QueryInterface(Ci.nsIHttpChannelInternal);
 
         this._data.length = 0;
         try {
           try {
-            testArray[testIndex].onStartRequest(ch, cx);
+            testArray[testIndex].onStartRequest(ch);
           } 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) {
         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, cx, status) {
+      onStopRequest(request, status) {
         this._channel = null;
 
         var ch = request.QueryInterface(Ci.nsIHttpChannel)
                         .QueryInterface(Ci.nsIHttpChannelInternal);
 
         // NB: The onStopRequest callback must run before performNextTest here,
         //     because the latter runs the next test's initChannel callback, and
         //     we want one test to be sequentially processed before the next
         //     one.
         try {
-          testArray[testIndex].onStopRequest(ch, cx, status, this._data);
+          testArray[testIndex].onStopRequest(ch, status, this._data);
         } finally {
           try {
             performNextTest();
           } finally {
             do_test_finished();
           }
         }
       },
--- a/netwerk/test/httpserver/test/test_async_response_sending.js
+++ b/netwerk/test/httpserver/test/test_async_response_sending.js
@@ -1469,31 +1469,29 @@ CopyTest.prototype =
    */
   _addToTasks: function _addToTasks(task) {
     this._tasks.push(task);
   },
 
   //
   // see nsIRequestObserver.onStartRequest
   //
-  onStartRequest: function onStartRequest(self, _) {
+  onStartRequest: function onStartRequest(self) {
     dumpn("*** CopyTest.onStartRequest (" + self.name + ")");
 
-    Assert.ok(_ === null);
     Assert.equal(this._receivedData.length, 0);
     Assert.equal(this._lastQuantum.length, 0);
   },
 
   //
   // see nsIRequestObserver.onStopRequest
   //
-  onStopRequest: function onStopRequest(self, _, status) {
+  onStopRequest: function onStopRequest(self, status) {
     dumpn("*** CopyTest.onStopRequest (" + self.name + ", " + status + ")");
 
-    Assert.ok(_ === null);
     this._actualStatus = status;
 
     this._copyingFinished = true;
 
     if (this._allDataWritten) {
       dumpn("*** all data written, continuing with remaining tests...");
       this._testComplete();
     } else {
--- a/netwerk/test/httpserver/test/test_basic_functionality.js
+++ b/netwerk/test/httpserver/test/test_basic_functionality.js
@@ -53,54 +53,54 @@ const HEADER_COUNT = 1000;
 // or invariants for every URL in paths
 function commonCheck(ch) {
   Assert.ok(ch.contentLength > -1);
   Assert.equal(ch.getResponseHeader("connection"), "close");
   Assert.ok(!ch.isNoStoreResponse());
   Assert.ok(!ch.isPrivateResponse());
 }
 
-function start_objHandler(ch, cx) {
+function start_objHandler(ch) {
   commonCheck(ch);
 
   Assert.equal(ch.responseStatus, 200);
   Assert.ok(ch.requestSucceeded);
   Assert.equal(ch.getResponseHeader("content-type"), "text/plain");
   Assert.equal(ch.responseStatusText, "OK");
 
   var reqMin = {}, reqMaj = {}, respMin = {}, respMaj = {};
   ch.getRequestVersion(reqMaj, reqMin);
   ch.getResponseVersion(respMaj, respMin);
   Assert.ok(reqMaj.value == respMaj.value &&
             reqMin.value == respMin.value);
 }
 
-function start_functionHandler(ch, cx) {
+function start_functionHandler(ch) {
   commonCheck(ch);
 
   Assert.equal(ch.responseStatus, 404);
   Assert.ok(!ch.requestSucceeded);
   Assert.equal(ch.getResponseHeader("foopy"), "quux-baz");
   Assert.equal(ch.responseStatusText, "Page Not Found");
 
   var reqMin = {}, reqMaj = {}, respMin = {}, respMaj = {};
   ch.getRequestVersion(reqMaj, reqMin);
   ch.getResponseVersion(respMaj, respMin);
   Assert.ok(reqMaj.value == 1 && reqMin.value == 1);
   Assert.ok(respMaj.value == 1 && respMin.value == 1);
 }
 
-function start_non_existent_path(ch, cx) {
+function start_non_existent_path(ch) {
   commonCheck(ch);
 
   Assert.equal(ch.responseStatus, 404);
   Assert.ok(!ch.requestSucceeded);
 }
 
-function start_lots_of_headers(ch, cx) {
+function start_lots_of_headers(ch) {
   commonCheck(ch);
 
   Assert.equal(ch.responseStatus, 200);
   Assert.ok(ch.requestSucceeded);
 
   for (var i = 0; i < HEADER_COUNT; i++)
     Assert.equal(ch.getResponseHeader("X-Header-" + i), "value " + i);
 }
--- a/netwerk/test/httpserver/test/test_byte_range.js
+++ b/netwerk/test/httpserver/test/test_byte_range.js
@@ -50,192 +50,192 @@ function run_test() {
   var dir = do_get_file("data/ranges/");
   srv.registerDirectory("/", dir);
 
   srv.start(-1);
 
   runHttpTests(tests, testComplete(srv));
 }
 
-function start_normal(ch, cx) {
+function start_normal(ch) {
   Assert.equal(ch.responseStatus, 200);
   Assert.equal(ch.getResponseHeader("Content-Length"), "21");
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/plain");
 }
 
-function stop_normal(ch, cx, status, data) {
+function stop_normal(ch, status, data) {
   Assert.equal(data.length, 21);
   Assert.equal(data[0], 0x54);
   Assert.equal(data[20], 0x0a);
 }
 
 function init_byterange(ch) {
   ch.setRequestHeader("Range", "bytes=10-", false);
 }
 
-function start_byterange(ch, cx) {
+function start_byterange(ch) {
   Assert.equal(ch.responseStatus, 206);
   Assert.equal(ch.getResponseHeader("Content-Length"), "11");
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/plain");
   Assert.equal(ch.getResponseHeader("Content-Range"), "bytes 10-20/21");
 }
 
-function stop_byterange(ch, cx, status, data) {
+function stop_byterange(ch, status, data) {
   Assert.equal(data.length, 11);
   Assert.equal(data[0], 0x64);
   Assert.equal(data[10], 0x0a);
 }
 
 function init_byterange2(ch) {
   ch.setRequestHeader("Range", "bytes=21-", false);
 }
 
-function start_byterange2(ch, cx) {
+function start_byterange2(ch) {
   Assert.equal(ch.responseStatus, 416);
 }
 
 function init_byterange3(ch) {
   ch.setRequestHeader("Range", "bytes=10-15", false);
 }
 
-function start_byterange3(ch, cx) {
+function start_byterange3(ch) {
   Assert.equal(ch.responseStatus, 206);
   Assert.equal(ch.getResponseHeader("Content-Length"), "6");
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/plain");
   Assert.equal(ch.getResponseHeader("Content-Range"), "bytes 10-15/21");
 }
 
-function stop_byterange3(ch, cx, status, data) {
+function stop_byterange3(ch, status, data) {
   Assert.equal(data.length, 6);
   Assert.equal(data[0], 0x64);
   Assert.equal(data[1], 0x20);
   Assert.equal(data[2], 0x62);
   Assert.equal(data[3], 0x65);
   Assert.equal(data[4], 0x20);
   Assert.equal(data[5], 0x73);
 }
 
 function init_byterange4(ch) {
   ch.setRequestHeader("Range", "xbytes=21-", false);
 }
 
-function start_byterange4(ch, cx) {
+function start_byterange4(ch) {
   Assert.equal(ch.responseStatus, 400);
 }
 
 function init_byterange5(ch) {
   ch.setRequestHeader("Range", "bytes=-5", false);
 }
 
-function start_byterange5(ch, cx) {
+function start_byterange5(ch) {
   Assert.equal(ch.responseStatus, 206);
 }
 
-function stop_byterange5(ch, cx, status, data) {
+function stop_byterange5(ch, status, data) {
   Assert.equal(data.length, 5);
   Assert.equal(data[0], 0x65);
   Assert.equal(data[1], 0x65);
   Assert.equal(data[2], 0x6e);
   Assert.equal(data[3], 0x2e);
   Assert.equal(data[4], 0x0a);
 }
 
 function init_byterange6(ch) {
   ch.setRequestHeader("Range", "bytes=15-12", false);
 }
 
-function start_byterange6(ch, cx) {
+function start_byterange6(ch) {
   Assert.equal(ch.responseStatus, 200);
 }
 
-function stop_byterange6(ch, cx, status, data) {
+function stop_byterange6(ch, status, data) {
   Assert.equal(data.length, 21);
   Assert.equal(data[0], 0x54);
   Assert.equal(data[20], 0x0a);
 }
 
 function init_byterange7(ch) {
   ch.setRequestHeader("Range", "bytes=0-5", false);
 }
 
-function start_byterange7(ch, cx) {
+function start_byterange7(ch) {
   Assert.equal(ch.responseStatus, 206);
   Assert.equal(ch.getResponseHeader("Content-Length"), "6");
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/plain");
   Assert.equal(ch.getResponseHeader("Content-Range"), "bytes 0-5/21");
 }
 
-function stop_byterange7(ch, cx, status, data) {
+function stop_byterange7(ch, status, data) {
   Assert.equal(data.length, 6);
   Assert.equal(data[0], 0x54);
   Assert.equal(data[1], 0x68);
   Assert.equal(data[2], 0x69);
   Assert.equal(data[3], 0x73);
   Assert.equal(data[4], 0x20);
   Assert.equal(data[5], 0x73);
 }
 
 function init_byterange8(ch) {
   ch.setRequestHeader("Range", "bytes=20-21", false);
 }
 
-function start_byterange8(ch, cx) {
+function start_byterange8(ch) {
   Assert.equal(ch.responseStatus, 206);
   Assert.equal(ch.getResponseHeader("Content-Range"), "bytes 20-20/21");
 }
 
-function stop_byterange8(ch, cx, status, data) {
+function stop_byterange8(ch, status, data) {
   Assert.equal(data.length, 1);
   Assert.equal(data[0], 0x0a);
 }
 
 function init_byterange9(ch) {
   ch.setRequestHeader("Range", "bytes=020-021", false);
 }
 
-function start_byterange9(ch, cx) {
+function start_byterange9(ch) {
   Assert.equal(ch.responseStatus, 206);
 }
 
-function stop_byterange9(ch, cx, status, data) {
+function stop_byterange9(ch, status, data) {
   Assert.equal(data.length, 1);
   Assert.equal(data[0], 0x0a);
 }
 
 function init_byterange10(ch) {
   ch.setRequestHeader("Range", "bytes=-", false);
 }
 
-function start_byterange10(ch, cx) {
+function start_byterange10(ch) {
   Assert.equal(ch.responseStatus, 400);
 }
 
 function init_byterange11(ch) {
   ch.setRequestHeader("Range", "bytes=-500", false);
 }
 
-function start_byterange11(ch, cx) {
+function start_byterange11(ch) {
   Assert.equal(ch.responseStatus, 206);
 }
 
-function stop_byterange11(ch, cx, status, data) {
+function stop_byterange11(ch, status, data) {
   Assert.equal(data.length, 21);
   Assert.equal(data[0], 0x54);
   Assert.equal(data[20], 0x0a);
 }
 
-function start_byterange12(ch, cx) {
+function start_byterange12(ch) {
   Assert.equal(ch.responseStatus, 200);
   Assert.equal(ch.getResponseHeader("Content-Length"), "0");
 }
 
-function stop_byterange12(ch, cx, status, data) {
+function stop_byterange12(ch, status, data) {
   Assert.equal(data.length, 0);
 }
 
 function init_byterange13(ch) {
   ch.setRequestHeader("Range", "bytes=9999999-", false);
 }
 
-function start_byterange13(ch, cx) {
+function start_byterange13(ch) {
   Assert.equal(ch.responseStatus, 416);
   Assert.equal(ch.getResponseHeader("X-SJS-Header"), "customized");
 }
--- a/netwerk/test/httpserver/test/test_cern_meta.js
+++ b/netwerk/test/httpserver/test/test_cern_meta.js
@@ -35,36 +35,36 @@ function run_test() {
   srv.start(-1);
 
   runHttpTests(tests, testComplete(srv));
 }
 
 
 // TEST DATA
 
-function start_testBoth(ch, cx) {
+function start_testBoth(ch) {
   Assert.equal(ch.responseStatus, 501);
   Assert.equal(ch.responseStatusText, "Unimplemented");
 
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/plain");
 }
 
-function start_test_ctype_override_txt(ch, cx) {
+function start_test_ctype_override_txt(ch) {
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/html");
 }
 
-function start_test_status_override_html(ch, cx) {
+function start_test_status_override_html(ch) {
   Assert.equal(ch.responseStatus, 404);
   Assert.equal(ch.responseStatusText, "Can't Find This");
 }
 
-function start_test_status_override_nodesc_txt(ch, cx) {
+function start_test_status_override_nodesc_txt(ch) {
   Assert.equal(ch.responseStatus, 732);
   Assert.equal(ch.responseStatusText, "");
 }
 
-function start_caret_test_txt_(ch, cx) {
+function start_caret_test_txt_(ch) {
   Assert.equal(ch.responseStatus, 500);
   Assert.equal(ch.responseStatusText, "This Isn't A Server Error");
 
   Assert.equal(ch.getResponseHeader("Foo-RFC"), "3092");
   Assert.equal(ch.getResponseHeader("Shaving-Cream-Atom"), "Illudium Phosdex");
 }
--- a/netwerk/test/httpserver/test/test_default_index_handler.js
+++ b/netwerk/test/httpserver/test/test_default_index_handler.js
@@ -217,21 +217,21 @@ XPCOMUtils.defineLazyGetter(this, "tests
     new Test(BASE_URL + "bar/folder^/", null, start, stopTrailingCaretDirectory),
   ];
 });
 
 // check top-level directory listing
 function start(ch) {
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/html;charset=utf-8");
 }
-function stopRootDirectory(ch, cx, status, data) {
+function stopRootDirectory(ch, status, data) {
   dataCheck(data, BASE_URL, "/", gDirEntries[0]);
 }
 
 // check non-top-level, too
-function stopFooDirectory(ch, cx, status, data) {
+function stopFooDirectory(ch, status, data) {
   dataCheck(data, BASE_URL + "foo/", "/foo/", gDirEntries[1]);
 }
 
 // trailing-caret leaf with hidden files
-function stopTrailingCaretDirectory(ch, cx, status, data) {
+function stopTrailingCaretDirectory(ch, status, data) {
   hiddenDataCheck(data, BASE_URL + "bar/folder^/", "/bar/folder^/");
 }
--- a/netwerk/test/httpserver/test/test_empty_body.js
+++ b/netwerk/test/httpserver/test/test_empty_body.js
@@ -27,17 +27,17 @@ function run_test() {
 
   srv.start(-1);
 
   runHttpTests(tests, testComplete(srv));
 }
 
 // TEST DATA
 
-function ensureEmpty(ch, cx) {
+function ensureEmpty(ch) {
   Assert.ok(ch.contentLength == 0);
 }
 
 // PATH HANDLERS
 
 // /empty-body-unwritten
 function emptyBodyUnwritten(metadata, response) {
   response.setStatusLine("1.1", 200, "OK");
--- a/netwerk/test/httpserver/test/test_errorhandler_exception.js
+++ b/netwerk/test/httpserver/test/test_errorhandler_exception.js
@@ -41,29 +41,29 @@ function checkStatusLine(channel, httpMa
   Assert.equal(channel.responseStatusText, statusText);
 
   var respMaj = {}, respMin = {};
   channel.getResponseVersion(respMaj, respMin);
   Assert.equal(respMaj.value, httpMaxVer);
   Assert.equal(respMin.value, httpMinVer);
 }
 
-function start_throws_exception(ch, cx) {
+function start_throws_exception(ch) {
   checkStatusLine(ch, 1, 1, 500, "Internal Server Error");
 }
 
-function start_nonexistent_404_fails_so_400(ch, cx) {
+function start_nonexistent_404_fails_so_400(ch) {
   checkStatusLine(ch, 1, 1, 400, "Bad Request");
 }
 
-function start_multiple_exceptions_500(ch, cx) {
+function start_multiple_exceptions_500(ch) {
   checkStatusLine(ch, 1, 1, 500, "Internal Server Error");
 }
 
-function succeeded(ch, cx, status, data) {
+function succeeded(ch, status, data) {
   Assert.ok(Components.isSuccessCode(status));
 }
 
 function register400Handler(ch) {
   srv.registerErrorHandler(400, throwsException);
 }
 
 
--- a/netwerk/test/httpserver/test/test_header_array.js
+++ b/netwerk/test/httpserver/test/test_header_array.js
@@ -47,17 +47,17 @@ function pathHandler(request, response) 
 
 XPCOMUtils.defineLazyGetter(this, "tests", function() {
   return [
     new Test("http://localhost:" + srv.identity.primaryPort + "/path-handler",
              null, check),
   ];
 });
 
-function check(ch, cx) {
+function check(ch) {
   var headerValue;
 
   headerValue = ch.getResponseHeader("Proxy-Authenticate");
   Assert.equal(headerValue, "First line 1\nSecond line 1\nThird line 1");
   headerValue = ch.getResponseHeader("WWW-Authenticate");
   Assert.equal(headerValue, "First line 2\nSecond line 2\nThird line 2");
   headerValue = ch.getResponseHeader("X-Single-Header-Merge");
   Assert.equal(headerValue, "Single 1,Single 2");
--- a/netwerk/test/httpserver/test/test_name_scheme.js
+++ b/netwerk/test/httpserver/test/test_name_scheme.js
@@ -59,27 +59,27 @@ function run_test() {
   srv.start(-1);
 
   runHttpTests(tests, testComplete(srv));
 }
 
 
 // TEST DATA
 
-function start_bar_html_(ch, cx) {
+function start_bar_html_(ch) {
   Assert.equal(ch.responseStatus, 200);
 
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/html");
 }
 
-function start_foo_html_(ch, cx) {
+function start_foo_html_(ch) {
   Assert.equal(ch.responseStatus, 404);
 }
 
-function start_normal_file_txt(ch, cx) {
+function start_normal_file_txt(ch) {
   Assert.equal(ch.responseStatus, 200);
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/plain");
 }
 
-function start_folder__file_txt(ch, cx) {
+function start_folder__file_txt(ch) {
   Assert.equal(ch.responseStatus, 200);
   Assert.equal(ch.getResponseHeader("Content-Type"), "text/plain");
 }
--- a/netwerk/test/httpserver/test/test_processasync.js
+++ b/netwerk/test/httpserver/test/test_processasync.js
@@ -52,17 +52,17 @@ function handleSync(request, response) {
   } catch (e) {
     isException(e, Cr.NS_ERROR_UNEXPECTED);
   }
 
   response.setStatusLine(request.httpVersion, 200, "handleSync pass");
 }
 handlers["/handleSync"] = handleSync;
 
-function start_handleSync(ch, cx) {
+function start_handleSync(ch) {
   Assert.equal(ch.responseStatus, 200);
   Assert.equal(ch.responseStatusText, "handleSync pass");
 }
 
 function handleAsync1(request, response) {
   response.setStatusLine(request.httpVersion, 500, "Old status line!");
   response.setHeader("X-Foo", "old value", false);
 
@@ -98,23 +98,23 @@ function handleAsync1(request, response)
     response.write("fugly");
     do_throw("late write() didn't throw");
   } catch (e) {
     isException(e, Cr.NS_ERROR_NOT_AVAILABLE);
   }
 }
 handlers["/handleAsync1"] = handleAsync1;
 
-function start_handleAsync1(ch, cx) {
+function start_handleAsync1(ch) {
   Assert.equal(ch.responseStatus, 200);
   Assert.equal(ch.responseStatusText, "New status line!");
   Assert.equal(ch.getResponseHeader("X-Foo"), "new value");
 }
 
-function stop_handleAsync1(ch, cx, status, data) {
+function stop_handleAsync1(ch, status, data) {
   Assert.equal(data.length, 0);
 }
 
 const startToHeaderDelay = 500;
 const startToFinishedDelay = 750;
 
 function handleAsync2(request, response) {
   response.processAsync();
@@ -170,28 +170,28 @@ handlers["/handleAsync2"] = handleAsync2
 
 var startTime_handleAsync2;
 
 function init_handleAsync2(ch) {
   var now = startTime_handleAsync2 = Date.now();
   dumpn("*** init_HandleAsync2: start time " + now);
 }
 
-function start_handleAsync2(ch, cx) {
+function start_handleAsync2(ch) {
   var now = Date.now();
   dumpn("*** start_handleAsync2: onStartRequest time " + now + ", " +
         (now - startTime_handleAsync2) + "ms after start time");
   Assert.ok(now >= startTime_handleAsync2 + startToHeaderDelay);
 
   Assert.equal(ch.responseStatus, 200);
   Assert.equal(ch.responseStatusText, "Status line");
   Assert.equal(ch.getResponseHeader("X-Custom-Header"), "value");
 }
 
-function stop_handleAsync2(ch, cx, status, data) {
+function stop_handleAsync2(ch, status, data) {
   var now = Date.now();
   dumpn("*** stop_handleAsync2: onStopRequest time " + now + ", " +
         (now - startTime_handleAsync2) + "ms after header time");
   Assert.ok(now >= startTime_handleAsync2 + startToFinishedDelay);
 
   Assert.equal(String.fromCharCode.apply(null, data), "BODY");
 }
 
@@ -236,15 +236,15 @@ function handleAsyncOrdering(request, re
     // knowingly break your code by changing the variable name.  :-P
     gThreadManager.dispatchToMainThread(writeData);
   }
   step();
   response.processAsync();
 }
 handlers["/handleAsyncOrdering"] = handleAsyncOrdering;
 
-function stop_handleAsyncOrdering(ch, cx, status, data) {
+function stop_handleAsyncOrdering(ch, status, data) {
   Assert.equal(data.length, 20 * 65536);
   data.forEach(function(v, index) {
     if (v !== 0)
       do_throw("value " + v + " at index " + index + " should be zero");
   });
 }
--- a/netwerk/test/httpserver/test/test_qi.js
+++ b/netwerk/test/httpserver/test/test_qi.js
@@ -39,22 +39,22 @@ function run_test() {
   srv.start(-1);
 
   runHttpTests(tests, testComplete(srv));
 }
 
 
 // TEST DATA
 
-function start_test(ch, cx) {
+function start_test(ch) {
   Assert.equal(ch.responseStatusText, "QI Tests Passed");
   Assert.equal(ch.responseStatus, 200);
 }
 
-function start_sjs_qi(ch, cx) {
+function start_sjs_qi(ch) {
   Assert.equal(ch.responseStatusText, "SJS QI Tests Passed");
   Assert.equal(ch.responseStatus, 200);
 }
 
 
 function testHandler(request, response) {
   var exstr;
   var qid;
--- a/netwerk/test/httpserver/test/test_registerdirectory.js
+++ b/netwerk/test/httpserver/test/test_registerdirectory.js
@@ -27,17 +27,17 @@ function checkOverride(ch) {
   Assert.equal(ch.getResponseHeader("Override-Succeeded"), "yes");
 }
 
 function check200(ch) {
   Assert.equal(ch.responseStatus, 200);
   Assert.equal(ch.responseStatusText, "OK");
 }
 
-function checkFile(ch, cx, status, data) {
+function checkFile(ch, status, data) {
   Assert.equal(ch.responseStatus, 200);
   Assert.ok(ch.requestSucceeded);
 
   var actualFile = serverBasePath.clone();
   actualFile.append("test_registerdirectory.js");
   Assert.equal(ch.getResponseHeader("Content-Length"),
                actualFile.fileSize.toString());
   Assert.equal(data.map(v => String.fromCharCode(v)).join(""),
--- a/netwerk/test/httpserver/test/test_registerfile.js
+++ b/netwerk/test/httpserver/test/test_registerfile.js
@@ -7,21 +7,21 @@
 // tests the registerFile API
 
 XPCOMUtils.defineLazyGetter(this, "BASE", function() {
   return "http://localhost:" + srv.identity.primaryPort;
 });
 
 var file = do_get_file("test_registerfile.js");
 
-function onStart(ch, cx) {
+function onStart(ch) {
   Assert.equal(ch.responseStatus, 200);
 }
 
-function onStop(ch, cx, status, data) {
+function onStop(ch, status, data) {
   // not sufficient for equality, but not likely to be wrong!
   Assert.equal(data.length, file.fileSize);
 }
 
 XPCOMUtils.defineLazyGetter(this, "test", function() {
   return new Test(BASE + "/foo", null, onStart, onStop);
 });
 
--- a/netwerk/test/httpserver/test/test_response_write.js
+++ b/netwerk/test/httpserver/test/test_response_write.js
@@ -25,22 +25,22 @@ function run_test() {
   srv.start(-1);
 
   runHttpTests(tests, testComplete(srv));
 }
 
 
 // TEST DATA
 
-function succeeded(ch, cx, status, data) {
+function succeeded(ch, status, data) {
   Assert.ok(Components.isSuccessCode(status));
   Assert.equal(data.map(v => String.fromCharCode(v)).join(""), "1234");
 }
 
-function check_1234(ch, cx) {
+function check_1234(ch) {
   Assert.equal(ch.getResponseHeader("Content-Length"), "4");
 }
 
 // PATH HANDLERS
 
 function writeString(metadata, response) {
   response.write("1234");
 }
--- a/netwerk/test/httpserver/test/test_setindexhandler.js
+++ b/netwerk/test/httpserver/test/test_setindexhandler.js
@@ -27,29 +27,29 @@ XPCOMUtils.defineLazyGetter(this, "tests
     new Test(URL, init, startCustomIndexHandler, stopCustomIndexHandler),
     new Test(URL, init, startDefaultIndexHandler, stopDefaultIndexHandler),
   ];
 });
 
 function init(ch) {
   ch.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE; // important!
 }
-function startCustomIndexHandler(ch, cx) {
+function startCustomIndexHandler(ch) {
   Assert.equal(ch.getResponseHeader("Content-Length"), "10");
   srv.setIndexHandler(null);
 }
-function stopCustomIndexHandler(ch, cx, status, data) {
+function stopCustomIndexHandler(ch, status, data) {
   Assert.ok(Components.isSuccessCode(status));
   Assert.equal(String.fromCharCode.apply(null, data), "directory!");
 }
 
-function startDefaultIndexHandler(ch, cx) {
+function startDefaultIndexHandler(ch) {
   Assert.equal(ch.responseStatus, 200);
 }
-function stopDefaultIndexHandler(ch, cx, status, data) {
+function stopDefaultIndexHandler(ch, status, data) {
   Assert.ok(Components.isSuccessCode(status));
 }
 
 // PATH HANDLERS
 
 function myIndexHandler(metadata, response) {
   var dir = metadata.getProperty("directory");
   Assert.ok(dir != null);
--- a/netwerk/test/httpserver/test/test_setstatusline.js
+++ b/netwerk/test/httpserver/test/test_setstatusline.js
@@ -62,51 +62,51 @@ XPCOMUtils.defineLazyGetter(this, "tests
     new Test(URL + "/nullVersion", null, startNullVersion, stop),
   ];
 });
 
 
 // /no/setstatusline
 function noSetstatusline(metadata, response) {
 }
-function startNoSetStatusLine(ch, cx) {
+function startNoSetStatusLine(ch) {
   checkStatusLine(ch, 1, 1, 200, "OK");
 }
-function stop(ch, cx, status, data) {
+function stop(ch, status, data) {
   Assert.ok(Components.isSuccessCode(status));
 }
 
 
 // /http1_0
 function http1_0(metadata, response) {
   response.setStatusLine("1.0", 200, "OK");
 }
-function startHttp1_0(ch, cx) {
+function startHttp1_0(ch) {
   checkStatusLine(ch, 1, 0, 200, "OK");
 }
 
 
 // /http1_1
 function http1_1(metadata, response) {
   response.setStatusLine("1.1", 200, "OK");
 }
-function startHttp1_1(ch, cx) {
+function startHttp1_1(ch) {
   checkStatusLine(ch, 1, 1, 200, "OK");
 }
 
 
 // /invalidVersion
 function invalidVersion(metadata, response) {
   try {
     response.setStatusLine(" 1.0", 200, "FAILED");
   } catch (e) {
     response.setHeader("Passed", "true", false);
   }
 }
-function startPassedTrue(ch, cx) {
+function startPassedTrue(ch) {
   checkStatusLine(ch, 1, 1, 200, "OK");
   Assert.equal(ch.getResponseHeader("Passed"), "true");
 }
 
 
 // /invalidStatus
 function invalidStatus(metadata, response) {
   try {
@@ -126,21 +126,21 @@ function invalidDescription(metadata, re
   }
 }
 
 
 // /crazyCode
 function crazyCode(metadata, response) {
   response.setStatusLine("1.1", 617, "Crazy");
 }
-function startCrazy(ch, cx) {
+function startCrazy(ch) {
   checkStatusLine(ch, 1, 1, 617, "Crazy");
 }
 
 
 // /nullVersion
 function nullVersion(metadata, response) {
   response.setStatusLine(null, 255, "NULL");
 }
-function startNullVersion(ch, cx) {
+function startNullVersion(ch) {
   // currently, this server implementation defaults to 1.1
   checkStatusLine(ch, 1, 1, 255, "NULL");
 }
--- a/netwerk/test/httpserver/test/test_sjs.js
+++ b/netwerk/test/httpserver/test/test_sjs.js
@@ -48,42 +48,42 @@ function setupTests(throwing) {
 
   //   registerFile with SJS => raw text
 
   function setupFile(ch) {
     srv.registerFile("/cgi.sjs", sjs);
     skipCache(ch);
   }
 
-  function verifyRawText(channel, cx, status, bytes) {
+  function verifyRawText(channel, status, bytes) {
     dumpn(channel.originalURI.spec);
     Assert.equal(bytesToString(bytes), fileContents(sjs));
   }
 
   test = new Test(TEST_URL, setupFile, null, verifyRawText);
   tests.push(test);
 
 
   //   add mapping, => interpreted
 
   function addTypeMapping(ch) {
     srv.registerContentType("sjs", "sjs");
     skipCache(ch);
   }
 
-  function checkType(ch, cx) {
+  function checkType(ch) {
     if (throwing) {
       Assert.ok(!ch.requestSucceeded);
       Assert.equal(ch.responseStatus, 500);
     } else {
       Assert.equal(ch.contentType, "text/plain");
     }
   }
 
-  function checkContents(ch, cx, status, data) {
+  function checkContents(ch, status, data) {
     if (!throwing)
       Assert.equal("PASS", bytesToString(data));
   }
 
   test = new Test(TEST_URL, addTypeMapping, checkType, checkContents);
   tests.push(test);
 
 
@@ -98,18 +98,18 @@ function setupTests(throwing) {
   }
 
   test = new Test(TEST_URL, setupDirectoryAndRemoveType, null, verifyRawText);
   tests.push(test);
 
 
   //   add mapping, => interpreted
 
-  function contentAndCleanup(ch, cx, status, data) {
-    checkContents(ch, cx, status, data);
+  function contentAndCleanup(ch, status, data) {
+    checkContents(ch, status, data);
 
     // clean up state we've set up
     srv.registerDirectory("/", null);
     srv.registerContentType("sjs", null);
   }
 
   test = new Test(TEST_URL, addTypeMapping, checkType, contentAndCleanup);
   tests.push(test);
@@ -133,33 +133,33 @@ setupTests(false);
 
 function init(ch) {
   // clean up state we've set up
   srv.registerDirectory("/", sjs.parent);
   srv.registerContentType("sjs", "sjs");
   skipCache(ch);
 }
 
-function checkNotSJS(ch, cx, status, data) {
+function checkNotSJS(ch, status, data) {
   Assert.notEqual("FAIL", bytesToString(data));
 }
 
 test = new Test(BASE + "/sjs", init, null, checkNotSJS);
 tests.push(test);
 
 // Test that Range requests are passed through to the SJS file without
 // bounds checking.
 
 function rangeInit(expectedRangeHeader) {
   return function setupRangeRequest(ch) {
     ch.setRequestHeader("Range", expectedRangeHeader, false);
   };
 }
 
-function checkRangeResult(ch, cx) {
+function checkRangeResult(ch) {
   try {
     var val = ch.getResponseHeader("Content-Range");
   } catch (e) { /* IDL doesn't specify a particular exception to require */ }
   if (val !== undefined) {
     do_throw("should not have gotten a Content-Range header, but got one " +
              "with this value: " + val);
   }
   Assert.equal(200, ch.responseStatus);
@@ -190,21 +190,21 @@ tests.push(test);
 // One last test: for file mappings, the content-type is determined by the
 // extension of the file on the server, not by the extension of the requested
 // path.
 
 function setupFileMapping(ch) {
   srv.registerFile("/script.html", sjs);
 }
 
-function onStart(ch, cx) {
+function onStart(ch) {
   Assert.equal(ch.contentType, "text/plain");
 }
 
-function onStop(ch, cx, status, data) {
+function onStop(ch, status, data) {
   Assert.equal("PASS", bytesToString(data));
 }
 
 test = new Test(BASE + "/script.html", setupFileMapping, onStart, onStop);
 tests.push(test);
 
 
 /** ***************
--- a/netwerk/test/httpserver/test/test_sjs_object_state.js
+++ b/netwerk/test/httpserver/test/test_sjs_object_state.js
@@ -52,30 +52,30 @@ function run_test() {
  *     triggerStart
  *         |
  *         V
  *     triggerStop
  *
  */
 
 var initialStarted = false;
-function initialStart(ch, cx) {
+function initialStart(ch) {
   dumpn("*** initialStart");
 
   if (initialStarted)
     do_throw("initialStart: initialStarted is true?!?!");
 
   initialStarted = true;
 
   new HTTPTestLoader(PATH + "?state=intermediate",
                      intermediateStart, intermediateStop);
 }
 
 var initialStopped = false;
-function initialStop(ch, cx, status, data) {
+function initialStop(ch, status, data) {
   dumpn("*** initialStop");
 
   Assert.equal(data.map(function(v) { return String.fromCharCode(v); }).join(""),
                "done");
 
   Assert.equal(srv.getObjectState("object-state-test"), null);
 
   if (!initialStarted)
@@ -88,31 +88,31 @@ function initialStop(ch, cx, status, dat
     do_throw("initialStop: intermediateStopped is false?!?!");
 
   initialStopped = true;
 
   checkForFinish();
 }
 
 var intermediateStarted = false;
-function intermediateStart(ch, cx) {
+function intermediateStart(ch) {
   dumpn("*** intermediateStart");
 
   Assert.notEqual(srv.getObjectState("object-state-test"), null);
 
   if (!initialStarted)
     do_throw("intermediateStart: initialStarted is false?!?!");
   if (intermediateStarted)
     do_throw("intermediateStart: intermediateStarted is true?!?!");
 
   intermediateStarted = true;
 }
 
 var intermediateStopped = false;
-function intermediateStop(ch, cx, status, data) {
+function intermediateStop(ch, status, data) {
   dumpn("*** intermediateStop");
 
   Assert.equal(data.map(function(v) { return String.fromCharCode(v); }).join(""),
                "intermediate");
 
   Assert.notEqual(srv.getObjectState("object-state-test"), null);
 
   if (!initialStarted)
@@ -124,33 +124,33 @@ function intermediateStop(ch, cx, status
 
   intermediateStopped = true;
 
   new HTTPTestLoader(PATH + "?state=trigger", triggerStart,
                      triggerStop);
 }
 
 var triggerStarted = false;
-function triggerStart(ch, cx) {
+function triggerStart(ch) {
   dumpn("*** triggerStart");
 
   if (!initialStarted)
     do_throw("triggerStart: initialStarted is false?!?!");
   if (!intermediateStarted)
     do_throw("triggerStart: intermediateStarted is false?!?!");
   if (!intermediateStopped)
     do_throw("triggerStart: intermediateStopped is false?!?!");
   if (triggerStarted)
     do_throw("triggerStart: triggerStarted is true?!?!");
 
   triggerStarted = true;
 }
 
 var triggerStopped = false;
-function triggerStop(ch, cx, status, data) {
+function triggerStop(ch, status, data) {
   dumpn("*** triggerStop");
 
   Assert.equal(data.map(function(v) { return String.fromCharCode(v); }).join(""),
                "trigger");
 
   if (!initialStarted)
     do_throw("triggerStop: initialStarted is false?!?!");
   if (!intermediateStarted)
@@ -216,41 +216,41 @@ function HTTPTestLoader(path, start, sto
   /** onStopRequest callback. */
   this._stop = stop;
 
   var channel = makeChannel(path);
   channel.asyncOpen(this);
 }
 HTTPTestLoader.prototype =
   {
-    onStartRequest(request, cx) {
+    onStartRequest(request) {
       dumpn("*** HTTPTestLoader.onStartRequest for " + this._path);
 
       var ch = request.QueryInterface(Ci.nsIHttpChannel)
                       .QueryInterface(Ci.nsIHttpChannelInternal);
 
       try {
         try {
-          this._start(ch, cx);
+          this._start(ch);
         } 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) {
       dumpn("*** HTTPTestLoader.onDataAvailable for " + this._path);
 
       Array.prototype.push.apply(this._data,
                                  makeBIS(inputStream).readByteArray(count));
     },
-    onStopRequest(request, cx, status) {
+    onStopRequest(request, status) {
       dumpn("*** HTTPTestLoader.onStopRequest for " + this._path);
 
       var ch = request.QueryInterface(Ci.nsIHttpChannel)
                       .QueryInterface(Ci.nsIHttpChannelInternal);
 
-      this._stop(ch, cx, status, this._data);
+      this._stop(ch, status, this._data);
     },
     QueryInterface: ChromeUtils.generateQI(["nsIStreamListener", "nsIRequestObserver"]),
   };
--- a/netwerk/test/httpserver/test/test_sjs_state.js
+++ b/netwerk/test/httpserver/test/test_sjs_state.js
@@ -121,45 +121,45 @@ function expectValues(ch, oldShared, new
 
   Assert.equal(ch.responseStatus, 200);
   Assert.equal(getHeader("X-Old-Shared-Value"), oldShared);
   Assert.equal(getHeader("X-New-Shared-Value"), newShared);
   Assert.equal(getHeader("X-Old-Private-Value"), oldPrivate);
   Assert.equal(getHeader("X-New-Private-Value"), newPrivate);
 }
 
-function start_initial(ch, cx) {
+function start_initial(ch) {
 dumpn("XXX start_initial");
   expectValues(ch, "", "newShared", "", "newPrivate");
 }
 
-function start_overwrite(ch, cx) {
+function start_overwrite(ch) {
   expectValues(ch, "newShared", "newShared2", "newPrivate", "newPrivate2");
 }
 
-function start_remove(ch, cx) {
+function start_remove(ch) {
   expectValues(ch, "newShared2", "", "newPrivate2", "newPrivate3");
 }
 
-function start_handler(ch, cx) {
+function start_handler(ch) {
   expectValues(ch, "", "pathHandlerShared", "", "pathHandlerPrivate");
 }
 
-function start_handler_again(ch, cx) {
+function start_handler_again(ch) {
   expectValues(ch, "pathHandlerShared", "",
                "pathHandlerPrivate", "pathHandlerPrivate2");
 }
 
-function start_other_initial(ch, cx) {
+function start_other_initial(ch) {
   expectValues(ch, "", "newShared4", "", "newPrivate4");
 }
 
-function start_other_remove_ignore(ch, cx) {
+function start_other_remove_ignore(ch) {
   expectValues(ch, "newShared4", "", "newPrivate4", "");
 }
 
-function start_other_set_new(ch, cx) {
+function start_other_set_new(ch) {
   expectValues(ch, "", "newShared5", "newPrivate4", "newPrivate5");
 }
 
-function start_set_remove_original(ch, cx) {
+function start_set_remove_original(ch) {
   expectValues(ch, "newShared5", "done!", "newPrivate3", "");
 }
--- a/netwerk/test/httpserver/test/test_sjs_throwing_exceptions.js
+++ b/netwerk/test/httpserver/test/test_sjs_throwing_exceptions.js
@@ -48,23 +48,23 @@ XPCOMUtils.defineLazyGetter(this, "tests
   var _test = new Test(URL + "/thrower.sjs?throw", null, start_thrower);
   for (var i = 0; i < TEST_RUNS; i++)
     _tests[i] = _test;
   // ...and don't forget to stop!
   _tests[TEST_RUNS] = new Test(URL + "/thrower.sjs", null, start_last);
   return _tests;
 });
 
-function start_thrower(ch, cx) {
+function start_thrower(ch) {
   Assert.equal(ch.responseStatus, 500);
   Assert.ok(!ch.requestSucceeded);
 
   gStartCount++;
 }
 
-function start_last(ch, cx) {
+function start_last(ch) {
   Assert.equal(ch.responseStatus, 200);
   Assert.ok(ch.requestSucceeded);
 
   Assert.equal(ch.getResponseHeader("X-Test-Status"), "PASS");
 
   lastPassed = true;
 }
--- a/netwerk/test/unit/head_cache2.js
+++ b/netwerk/test/unit/head_cache2.js
@@ -51,27 +51,27 @@ 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, aContext) { },
+      onStartRequest: function (aRequest) { },
       onDataAvailable: function (aRequest, aContext, 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;
       },
-      onStopRequest: function (aRequest, aContext, aStatusCode)
+      onStopRequest: function (aRequest, aStatusCode)
       {
         LOG_C2("done reading data: " + aStatusCode);
         Assert.equal(aStatusCode, Cr.NS_OK);
         goon(data);
       },
     }, null);
   }
   else {
--- a/netwerk/test/unit/head_channels.js
+++ b/netwerk/test/unit/head_channels.js
@@ -67,17 +67,17 @@ ChannelListener.prototype = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     try {
       if (this._got_onstartrequest)
         do_throw("Got second onStartRequest event!");
       this._got_onstartrequest = true;
       this._lastEvent = Date.now();
 
       try {
         this._isFromCache = request.QueryInterface(Ci.nsICacheInfoChannel).isFromCache();
@@ -154,17 +154,17 @@ ChannelListener.prototype = {
 
       this._buffer = this._buffer.concat(read_stream(stream, count));
       this._lastEvent = current;
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     try {
       var success = Components.isSuccessCode(status);
       if (!this._got_onstartrequest)
         do_throw("onStopRequest without onStartRequest event!");
       if (this._got_onstoprequest)
         do_throw("Got second onStopRequest event!");
       this._got_onstoprequest = true;
       if ((this._flags & (CL_EXPECT_FAILURE | CL_EXPECT_LATE_FAILURE)) && success)
--- a/netwerk/test/unit/test_alt-data_stream.js
+++ b/netwerk/test/unit/test_alt-data_stream.js
@@ -93,31 +93,31 @@ function openAltChannel()
   var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
   cc.preferAlternativeDataType(altContentType, "", true);
 
   chan.asyncOpen(altDataListener);
 }
 
 var altDataListener = {
   buffer: "",
-  onStartRequest: function(request, context) { },
+  onStartRequest: function(request) { },
   onDataAvailable: function(request, context, 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
       os.write(altContent.substring(firstChunkSize, altContent.length), altContent.length - firstChunkSize);
       os.close();
     }
   },
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     var cc = request.QueryInterface(Ci.nsICacheInfoChannel);
     Assert.equal(cc.alternativeDataType, altContentType);
     Assert.equal(this.buffer.length, altContent.length);
     Assert.equal(this.buffer, altContent);
     openAltChannelWithOriginalContent();
   },
 };
 
@@ -127,22 +127,22 @@ function openAltChannelWithOriginalConte
   var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
   cc.preferAlternativeDataType(altContentType, "", false);
 
   chan.asyncOpen(originalListener);
 }
 
 var originalListener = {
   buffer: "",
-  onStartRequest: function(request, context) { },
+  onStartRequest: function(request) { },
   onDataAvailable: function(request, context, stream, offset, count) {
     let string = NetUtil.readInputStreamToString(stream, count);
     this.buffer += string;
   },
-  onStopRequest: function(request, context, status) {
+  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);
     testAltDataStream(cc);
   },
 };
 
--- a/netwerk/test/unit/test_altsvc.js
+++ b/netwerk/test/unit/test_altsvc.js
@@ -144,34 +144,34 @@ var retryCounter = 0;
 var loadWithoutClearingMappings = false;
 var nextTest;
 var expectPass = true;
 var waitFor = 0;
 var originAttributes = {};
 
 var Listener = function() {};
 Listener.prototype = {
-  onStartRequest: function testOnStartRequest(request, ctx) {
+  onStartRequest: function testOnStartRequest(request) {
     Assert.ok(request instanceof Ci.nsIHttpChannel);
 
     if (expectPass) {
       if (!Components.isSuccessCode(request.status)) {
         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) {
     read_stream(stream, cnt);
   },
 
-  onStopRequest: function testOnStopRequest(request, ctx, status) {
+  onStopRequest: function testOnStopRequest(request, status) {
     var routed = "";
     try {
       routed = request.getRequestHeader("Alt-Used");
     } catch (e) {}
     dump("routed is " + routed + "\n");
     Assert.equal(Components.isSuccessCode(status), expectPass);
 
     if (waitFor != 0) {
--- a/netwerk/test/unit/test_anonymous-coalescing.js
+++ b/netwerk/test/unit/test_anonymous-coalescing.js
@@ -75,31 +75,31 @@ var origin;
 var nextPortExpectedToBeSame = false;
 var currentPort = 0;
 var forceReload = false;
 var anonymous = false;
 
 var Listener = function() {};
 Listener.prototype.clientPort = 0;
 Listener.prototype = {
-  onStartRequest: function testOnStartRequest(request, ctx) {
+  onStartRequest: function testOnStartRequest(request) {
     Assert.ok(request instanceof Ci.nsIHttpChannel);
 
     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) {
     read_stream(stream, cnt);
   },
 
-  onStopRequest: function testOnStopRequest(request, ctx, status) {
+  onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(Components.isSuccessCode(status));
     if (nextPortExpectedToBeSame) {
      Assert.equal(currentPort, this.clientPort);
     } else {
      Assert.notEqual(currentPort, this.clientPort);
     }
     currentPort = this.clientPort;
     nextTest();
--- a/netwerk/test/unit/test_auth_dialog_permission.js
+++ b/netwerk/test/unit/test_auth_dialog_permission.js
@@ -141,17 +141,17 @@ function Test(subresource_http_auth_allo
 
 Test.prototype = {
   _subresource_http_auth_allow_pref: 1,
   _loadingUri: null,
   _uri: null,
   _contentPolicy: Ci.nsIContentPolicy.TYPE_OTHER,
   _expectedCode: 200,
 
-  onStartRequest: function(request, ctx) {
+  onStartRequest: function(request) {
     try {
       if (!Components.isSuccessCode(request.status)) {
         do_throw("Channel should have a success code!");
       }
 
       if (!(request instanceof Ci.nsIHttpChannel)) {
         do_throw("Expecting an HTTP channel");
       }
@@ -166,17 +166,17 @@ Test.prototype = {
 
     throw Cr.NS_ERROR_ABORT;
   },
 
   onDataAvailable: function(request, context, stream, offset, count) {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function(request, ctx, status) {
+  onStopRequest: function(request, status) {
     Assert.equal(status, Cr.NS_ERROR_ABORT);
 
     // Clear the auth cache.
     Cc["@mozilla.org/network/http-auth-manager;1"]
       .getService(Ci.nsIHttpAuthManager)
       .clearAll();
 
     do_timeout(0, run_next_test);
--- a/netwerk/test/unit/test_auth_proxy.js
+++ b/netwerk/test/unit/test_auth_proxy.js
@@ -154,17 +154,17 @@ Requestor.prototype = {
   },
 
   prompt2: null
 };
 
 var listener = {
   expectedCode: -1, // uninitialized
 
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     try {
       // Proxy auth cancellation return failures to avoid spoofing
       if (!Components.isSuccessCode(request.status) &&
           (this.expectedCode != 407))
         do_throw("Channel should have a success code!");
 
       if (!(request instanceof Ci.nsIHttpChannel))
         do_throw("Expecting an HTTP channel");
@@ -185,17 +185,17 @@ var listener = {
 
     throw Cr.NS_ERROR_ABORT;
   },
 
   onDataAvailable: function test_ODA() {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     Assert.equal(status, Cr.NS_ERROR_ABORT);
 
     if (current_test < (tests.length - 1)) {
       // First, need to clear the auth cache
       Cc["@mozilla.org/network/http-auth-manager;1"]
             .getService(Ci.nsIHttpAuthManager)
             .clearAll();
 
--- a/netwerk/test/unit/test_authentication.js
+++ b/netwerk/test/unit/test_authentication.js
@@ -254,17 +254,17 @@ RealmTestRequestor.prototype = {
   asyncPromptAuth: function realmtest_async(chan, cb, ctx, lvl, info) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   }
 };
 
 var listener = {
   expectedCode: -1, // Uninitialized
 
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     try {
       if (!Components.isSuccessCode(request.status))
         do_throw("Channel should have a success code!");
 
       if (!(request instanceof Ci.nsIHttpChannel))
         do_throw("Expecting an HTTP channel");
 
       Assert.equal(request.responseStatus, this.expectedCode);
@@ -277,17 +277,17 @@ var listener = {
 
     throw Cr.NS_ERROR_ABORT;
   },
 
   onDataAvailable: function test_ODA() {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     Assert.equal(status, Cr.NS_ERROR_ABORT);
 
     moveToNextTest();
   }
 };
 
 function makeChan(url, loadingUrl) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
--- a/netwerk/test/unit/test_backgroundfilesaver.js
+++ b/netwerk/test/unit/test_backgroundfilesaver.js
@@ -166,17 +166,17 @@ function promiseCopyToSaver(aSourceStrin
   return new Promise((resolve, reject) => {
     let inputStream = new StringInputStream(aSourceString, aSourceString.length);
     let copier = Cc["@mozilla.org/network/async-stream-copier;1"]
                  .createInstance(Ci.nsIAsyncStreamCopier);
     copier.init(inputStream, aSaverOutputStream, null, false, true, 0x8000, true,
                 aCloseWhenDone);
     copier.asyncCopy({
       onStartRequest: function () { },
-      onStopRequest: function (aRequest, aContext, aStatusCode)
+      onStopRequest: function (aRequest, aStatusCode)
       {
         if (Components.isSuccessCode(aStatusCode)) {
           resolve();
         } else {
           reject(new Components.Exception(aResult));
         }
       },
     }, null);
@@ -201,23 +201,23 @@ function promisePumpToSaver(aSourceStrin
                             aCloseWhenDone) {
   return new Promise((resolve, reject) => {
     aSaverStreamListener.QueryInterface(Ci.nsIStreamListener);
     let inputStream = new StringInputStream(aSourceString, aSourceString.length);
     let pump = Cc["@mozilla.org/network/input-stream-pump;1"]
                .createInstance(Ci.nsIInputStreamPump);
     pump.init(inputStream, 0, 0, true);
     pump.asyncRead({
-      onStartRequest: function PPTS_onStartRequest(aRequest, aContext)
+      onStartRequest: function PPTS_onStartRequest(aRequest)
       {
-        aSaverStreamListener.onStartRequest(aRequest, aContext);
+        aSaverStreamListener.onStartRequest(aRequest);
       },
-      onStopRequest: function PPTS_onStopRequest(aRequest, aContext, aStatusCode)
+      onStopRequest: function PPTS_onStopRequest(aRequest, aStatusCode)
       {
-        aSaverStreamListener.onStopRequest(aRequest, aContext, aStatusCode);
+        aSaverStreamListener.onStopRequest(aRequest, aStatusCode);
         if (Components.isSuccessCode(aStatusCode)) {
           resolve();
         } else {
           reject(new Components.Exception(aResult));
         }
       },
       onDataAvailable: function PPTS_onDataAvailable(aRequest, aContext,
                                                      aInputStream, aOffset,
--- a/netwerk/test/unit/test_bug1218029.js
+++ b/netwerk/test/unit/test_bug1218029.js
@@ -63,20 +63,20 @@ function execute_test(test) {
     QueryInterface:
       ChromeUtils.generateQI([Ci.nsIIncrementalStreamLoaderObserver])
   };
 
   let listener = Cc["@mozilla.org/network/incremental-stream-loader;1"]
                  .createInstance(Ci.nsIIncrementalStreamLoader);
   listener.init(observer);
 
-  listener.onStartRequest(channel, null);
+  listener.onStartRequest(channel);
   var offset = 0;
   test.chunks.forEach(function (chunkLength) {
     listener.onDataAvailable(channel, null, stream, offset, chunkLength);
     offset += chunkLength;
   });
-  listener.onStopRequest(channel, null, test.status);
+  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
@@ -23,17 +23,17 @@ Listener.prototype = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, ctx) {
+  onStartRequest: function(request) {
     Assert.equal(request.status, Cr.NS_OK);
     this._buffer = "";
   },
 
   onDataAvailable: function(request, cx, stream, offset, cnt) {
     if (pass == 0) {
       this._buffer = this._buffer.concat(read_stream(stream, cnt));
     } else {
@@ -41,17 +41,17 @@ Listener.prototype = {
       if (!request.isFromCache()) {
         do_throw("Response is not from the cache");
       }
 
       request.cancel(Cr.NS_ERROR_ABORT);
     }
   },
 
-  onStopRequest: function(request, ctx, status) {
+  onStopRequest: function(request, status) {
     if (pass == 0) {
       Assert.equal(this._buffer.length, responseLen);
       pass++;
 
       var channel = setupChannel();
       channel.loadFlags = Ci.nsIRequest.VALIDATE_NEVER;
       channel.asyncOpen(new Listener());
     } else {
--- a/netwerk/test/unit/test_bug1312774_http1.js
+++ b/netwerk/test/unit/test_bug1312774_http1.js
@@ -84,23 +84,23 @@ function setup_urgentStartRequests() {
 function HttpResponseListener(id)
 {
   this.id = id
 };
 
 var testOrder = 0;
 HttpResponseListener.prototype =
 {
-  onStartRequest: function (request, ctx) {
+  onStartRequest: function (request) {
   },
 
   onDataAvailable: function (request, ctx, stream, off, cnt) {
   },
 
-  onStopRequest: function (request, ctx, status) {
+  onStopRequest: function (request, status) {
     log("STOP id=" + this.id);
     do_test_finished();
   }
 };
 
 var responseQueue = new Array();
 function setup_http_server()
 {
--- a/netwerk/test/unit/test_bug1312782_http1.js
+++ b/netwerk/test/unit/test_bug1312782_http1.js
@@ -90,23 +90,23 @@ function setup_nonFocusedWindowHttpReque
 
 function HttpResponseListener(id)
 {
   this.id = id
 };
 
 HttpResponseListener.prototype =
 {
-  onStartRequest: function (request, ctx) {
+  onStartRequest: function (request) {
   },
 
   onDataAvailable: function (request, ctx, stream, off, cnt) {
   },
 
-  onStopRequest: function (request, ctx, status) {
+  onStopRequest: function (request, status) {
     log("STOP id=" + this.id);
     do_test_finished();
   }
 };
 
 function check_response_id(responses, maxWindowId)
 {
   for (var i = 0; i < responses.length; i++) {
--- a/netwerk/test/unit/test_bug1355539_http1.js
+++ b/netwerk/test/unit/test_bug1355539_http1.js
@@ -102,23 +102,23 @@ function check_response_id(responses)
 function HttpResponseListener(id, onStopCallback)
 {
   this.id = id
   this.stopCallback = onStopCallback;
 };
 
 HttpResponseListener.prototype =
 {
-  onStartRequest: function (request, ctx) {
+  onStartRequest: function (request) {
   },
 
   onDataAvailable: function (request, ctx, stream, off, cnt) {
   },
 
-  onStopRequest: function (request, ctx, status) {
+  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
@@ -98,23 +98,23 @@ function setup_nonFocusedWindowHttpReque
 
 function HttpResponseListener(id)
 {
   this.id = id
 }
 
 HttpResponseListener.prototype =
 {
-  onStartRequest: function (request, ctx) {
+  onStartRequest: function (request) {
   },
 
   onDataAvailable: function (request, ctx, stream, off, cnt) {
   },
 
-  onStopRequest: function (request, ctx, status) {
+  onStopRequest: function (request, status) {
     log("STOP id=" + this.id);
     do_test_finished();
   }
 };
 
 function check_response_id(responses, windowId)
 {
   for (var i = 0; i < responses.length; i++) {
--- a/netwerk/test/unit/test_bug1411316_http1.js
+++ b/netwerk/test/unit/test_bug1411316_http1.js
@@ -63,23 +63,23 @@ function setupHttpRequests(status) {
 function HttpResponseListener(id, onStopRequestStatus)
 {
   this.id = id
   this.onStopRequestStatus = onStopRequestStatus;
 };
 
 HttpResponseListener.prototype =
 {
-  onStartRequest: function (request, ctx) {
+  onStartRequest: function (request) {
   },
 
   onDataAvailable: function (request, ctx, stream, off, cnt) {
   },
 
-  onStopRequest: function (request, ctx, status) {
+  onStopRequest: function (request, status) {
     log("STOP id=" + this.id + " status=" + status);
     Assert.ok(this.onStopRequestStatus == status);
     do_test_finished();
   }
 };
 
 var responseQueue = new Array();
 function setup_http_server()
--- a/netwerk/test/unit/test_bug282432.js
+++ b/netwerk/test/unit/test_bug282432.js
@@ -9,19 +9,19 @@ function run_test() {
     QueryInterface: function(aIID) {
       if (aIID.equals(Ci.nsIStreamListener) ||
           aIID.equals(Ci.nsIRequestObserver) ||
           aIID.equals(Ci.nsISupports))
         return this;
       throw Cr.NS_NOINTERFACE;
     },
 
-    onStartRequest: function(aRequest, aContext) {},
+    onStartRequest: function(aRequest) {},
 
-    onStopRequest: function(aRequest, aContext, aStatusCode) {
+    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) {
       do_throw("The channel must not call onDataAvailable().");
     }
--- a/netwerk/test/unit/test_bug331825.js
+++ b/netwerk/test/unit/test_bug331825.js
@@ -1,19 +1,19 @@
 const {HttpServer} = ChromeUtils.import("resource://testing-common/httpd.js");
 const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
 var server;
 const BUGID = "331825";
 
 function TestListener() {
 }
-TestListener.prototype.onStartRequest = function(request, context) {
+TestListener.prototype.onStartRequest = function(request) {
 }
-TestListener.prototype.onStopRequest = function(request, context, status) {
+TestListener.prototype.onStopRequest = function(request, status) {
   var channel = request.QueryInterface(Ci.nsIHttpChannel);
   Assert.equal(channel.responseStatus, 304);
 
   server.stop(do_test_finished);
 }
 
 function run_test() {
   // start server
--- a/netwerk/test/unit/test_bug369787.js
+++ b/netwerk/test/unit/test_bug369787.js
@@ -11,28 +11,28 @@ function change_content_type() {
   channel.contentType = newType;
   Assert.equal(channel.contentType, newType);
   channel.contentType = origType;
   Assert.equal(channel.contentType, origType);
 }
 
 function TestListener() {
 }
-TestListener.prototype.onStartRequest = function(request, context) {
+TestListener.prototype.onStartRequest = function(request) {
   try {
     // request might be different from channel
     channel = request.QueryInterface(Ci.nsIChannel);
 
     change_content_type();
   } catch (ex) {
     print(ex);
     throw ex;
   }
 }
-TestListener.prototype.onStopRequest = function(request, context, status) {
+TestListener.prototype.onStopRequest = function(request, status) {
   try {
     change_content_type();
   } catch (ex) {
     print(ex);
     // don't re-throw ex to avoid hanging the test
   }
 
   do_timeout(0, after_channel_closed);
--- a/netwerk/test/unit/test_bug412945.js
+++ b/netwerk/test/unit/test_bug412945.js
@@ -1,20 +1,20 @@
 const {HttpServer} = ChromeUtils.import("resource://testing-common/httpd.js");
 const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
 var httpserv;
 
 function TestListener() {
 }
 
-TestListener.prototype.onStartRequest = function(request, context) {
+TestListener.prototype.onStartRequest = function(request) {
 }
 
-TestListener.prototype.onStopRequest = function(request, context, status) {
+TestListener.prototype.onStopRequest = function(request, status) {
   httpserv.stop(do_test_finished);
 }
 
 function run_test() {
   httpserv = new HttpServer();
 
   httpserv.registerPathHandler("/bug412945", bug412945);
 
--- a/netwerk/test/unit/test_bug455311.js
+++ b/netwerk/test/unit/test_bug455311.js
@@ -60,29 +60,29 @@ RequestObserver.prototype = {
   {
     if (iid.equals(Ci.nsISupports) ||
 	iid.equals(Ci.nsIRequestObserver) ||
 	iid.equals(Ci.nsIStreamListener)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
-  onStartRequest: function (req, ctx)
+  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)
   {
     do_throw("Unexpected call to onDataAvailable");
   },
-  onStopRequest: function (req, ctx, status)
+  onStopRequest: function (req, status)
   {
     var chan = req.QueryInterface(Ci.nsIChannel);
     try {
       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);
       Assert.equal(status, Cr.NS_ERROR_ABORT);
--- a/netwerk/test/unit/test_bug470716.js
+++ b/netwerk/test/unit/test_bug470716.js
@@ -18,19 +18,19 @@ var copier;
 var test_result;
 var test_content;
 var test_source_closed;
 var test_sink_closed;
 var test_nr;
 
 var copyObserver =
 {
-  onStartRequest: function(request, context) { },
+  onStartRequest: function(request) { },
 
-  onStopRequest: function(request, cx, statusCode)
+  onStopRequest: function(request, statusCode)
   {
     // check status code
     Assert.equal(statusCode, test_result);
 
     // check number of copied bytes
     Assert.equal(pipe2.inputStream.available(), test_content.length);
 
     // check content
--- a/netwerk/test/unit/test_bug482601.js
+++ b/netwerk/test/unit/test_bug482601.js
@@ -19,25 +19,25 @@ var observer = {
     if (observers_called.length)
       observers_called += ",";
 
     observers_called += topic;
   }
 };
 
 var listener = {
-  onStartRequest: function (request, ctx) {
+  onStartRequest: function (request) {
     buffer = "";
   },
 
   onDataAvailable: function (request, ctx, stream, offset, count) {
     buffer = buffer.concat(read_stream(stream, count));
   },
 
-  onStopRequest: function (request, ctx, status) {
+  onStopRequest: function (request, status) {
     Assert.equal(status, Cr.NS_OK);
     Assert.equal(buffer, "0123456789");
     Assert.equal(observers_called, results[test_nr]);
     test_nr++;
     do_timeout(0, do_test);
   }
 };
 
--- a/netwerk/test/unit/test_bug536324_64bit_content_length.js
+++ b/netwerk/test/unit/test_bug536324_64bit_content_length.js
@@ -6,27 +6,27 @@ const {NetUtil} = ChromeUtils.import("re
 
 // This C-L is significantly larger than (U)INT32_MAX, to make sure we do
 // 64-bit properly.
 const CONTENT_LENGTH = "1152921504606846975";
 
 var httpServer = null;
 
 var listener = {
-  onStartRequest: function (req, ctx) {
+  onStartRequest: function (req) {
   },
 
   onDataAvailable: function (req, ctx, 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, ctx, stat) {
+  onStopRequest: function (req, stat) {
     httpServer.stop(do_test_finished);
   }
 };
 
 function hugeContentLength(metadata, response) {
   var text = "abcdefghijklmnopqrstuvwxyz";
   var bytes_written = 0;
 
--- a/netwerk/test/unit/test_bug561042.js
+++ b/netwerk/test/unit/test_bug561042.js
@@ -11,23 +11,23 @@ const SERVER_PORT = 8080;
 const baseURL = "http://localhost:" + SERVER_PORT + "/";
 
 var cookie = "";
 for (let i =0; i < 10000; i++) {
     cookie += " big cookie";
 }
 
 var listener = {
-  onStartRequest: function (request, ctx) {
+  onStartRequest: function (request) {
   },
 
   onDataAvailable: function (request, ctx, stream) {
   },
 
-  onStopRequest: function (request, ctx, status) {
+  onStopRequest: function (request, status) {
       Assert.equal(status, Cr.NS_OK);
       server.stop(do_test_finished);
   },
 
 };
 
 var server = new HttpServer();
 function run_test() {
--- a/netwerk/test/unit/test_bug596443.js
+++ b/netwerk/test/unit/test_bug596443.js
@@ -29,23 +29,23 @@ Listener.prototype = {
     QueryInterface: function(iid) {
         if (iid.equals(Ci.nsIStreamListener) ||
             iid.equals(Ci.nsIRequestObserver) ||
             iid.equals(Ci.nsISupports))
           return this;
         throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
-    onStartRequest: function (request, ctx) {
+    onStartRequest: function (request) {
         this._buffer = "";
     },
     onDataAvailable: function (request, ctx, stream, offset, count) {
         this._buffer = this._buffer.concat(read_stream(stream, count));
     },
-    onStopRequest: function (request, ctx, status) {
+    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_bug618835.js
+++ b/netwerk/test/unit/test_bug618835.js
@@ -19,62 +19,62 @@ var httpserv;
 function setupChannel(path) {
   return NetUtil.newChannel({uri: path, loadUsingSystemPrincipal: true})
                 .QueryInterface(Ci.nsIHttpChannel);
 }
 
 // Verify that Content-Location-URI has been loaded once, load post_target
 function InitialListener() { }
 InitialListener.prototype = {
-    onStartRequest: function(request, context) { },
-    onStopRequest: function(request, context, status) {
+    onStartRequest: function(request) { },
+    onStopRequest: function(request, status) {
         Assert.equal(1, numberOfCLHandlerCalls);
         executeSoon(function() {
             var channel = setupChannel("http://localhost:" +
                                        httpserv.identity.primaryPort + "/post");
             channel.requestMethod = "POST";
             channel.asyncOpen(new RedirectingListener());
         });
     }
 };
 
 // Verify that Location-URI has been loaded once, reload post_target
 function RedirectingListener() { }
 RedirectingListener.prototype = {
-    onStartRequest: function(request, context) { },
-    onStopRequest: function(request, context, status) {
+    onStartRequest: function(request) { },
+    onStopRequest: function(request, status) {
         Assert.equal(1, numberOfHandlerCalls);
         executeSoon(function() {
             var channel = setupChannel("http://localhost:" +
                                        httpserv.identity.primaryPort + "/post");
             channel.requestMethod = "POST";
             channel.asyncOpen(new VerifyingListener());
         });
     }
 };
 
 // Verify that Location-URI has been loaded twice (cached entry invalidated),
 // reload Content-Location-URI
 function VerifyingListener() { }
 VerifyingListener.prototype = {
-    onStartRequest: function(request, context) { },
-    onStopRequest: function(request, context, status) {
+    onStartRequest: function(request) { },
+    onStopRequest: function(request, status) {
         Assert.equal(2, numberOfHandlerCalls);
         var channel = setupChannel("http://localhost:" +
                                    httpserv.identity.primaryPort + "/cl");
         channel.asyncOpen(new FinalListener());
     }
 };
 
 // Verify that Location-URI has been loaded twice (cached entry invalidated),
 // stop test
 function FinalListener() { }
 FinalListener.prototype = {
-    onStartRequest: function(request, context) { },
-    onStopRequest: function(request, context, status) {
+    onStartRequest: function(request) { },
+    onStopRequest: function(request, status) {
         Assert.equal(2, numberOfCLHandlerCalls);
         httpserv.stop(do_test_finished);
     }
 };
 
 function run_test() {
   httpserv = new HttpServer();
   httpserv.registerPathHandler("/cl", content_location);
--- a/netwerk/test/unit/test_bug633743.js
+++ b/netwerk/test/unit/test_bug633743.js
@@ -34,23 +34,23 @@ Test.prototype = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) { },
+  onStartRequest: function(request) { },
 
   onDataAvailable: function(request, context, stream, offset, count) {
     this._buffer = this._buffer.concat(read_stream(stream, count));
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     Assert.equal(this._buffer, this._expectVal);
     do_timeout(0, run_next_test);
   },
 
   run: function() {
     var channel = make_channel();
     channel.loadFlags = this._flags;
     channel.setRequestHeader(VALUE_HDR_NAME, this._sendVal, false);
--- a/netwerk/test/unit/test_bug667907.js
+++ b/netwerk/test/unit/test_bug667907.js
@@ -22,27 +22,27 @@ var listener_proto = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  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) {
     do_throw("Unexpected onDataAvailable");
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     Assert.equal(status, Cr.NS_BINDING_ABORTED);
     this.termination_func();
   }  
 };
 
 function listener(contentType, termination_func) {
   this.contentType = contentType;
   this.termination_func = termination_func;
--- a/netwerk/test/unit/test_bug856978.js
+++ b/netwerk/test/unit/test_bug856978.js
@@ -73,23 +73,23 @@ RequestObserver.prototype = {
       }
       // We are still here. Let's remove the authorization header now.
       subject.setRequestHeader("Authorization", null, false);
     }
   }
 }
 
 var listener = {
-  onStartRequest: function test_onStartR(request, ctx) {},
+  onStartRequest: function test_onStartR(request) {},
 
   onDataAvailable: function test_ODA() {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     if (current_test < (tests.length - 1)) {
       current_test++;
       tests[current_test]();
     } else {
       do_test_pending();
       httpServer.stop(do_test_finished);
     }
     do_test_finished();
--- a/netwerk/test/unit/test_cacheflags.js
+++ b/netwerk/test/unit/test_cacheflags.js
@@ -60,26 +60,26 @@ Test.prototype = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     var cachingChannel = request.QueryInterface(Ci.nsICacheInfoChannel);
     this._isFromCache = request.isPending() && cachingChannel.isFromCache();
   },
 
   onDataAvailable: function(request, context, stream, offset, count) {
     this._buffer = this._buffer.concat(read_stream(stream, count));
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     Assert.equal(Components.isSuccessCode(status), this.expectSuccess);
     Assert.equal(this._isFromCache, this.readFromCache);
     Assert.equal(gHitServer, this.hitServer);
 
     do_timeout(0, run_next_test);
   },
 
   run: function() {
--- a/netwerk/test/unit/test_content_length_underrun.js
+++ b/netwerk/test/unit/test_content_length_underrun.js
@@ -63,19 +63,19 @@ function run_gzip_test(num)
     QueryInterface: function(aIID) {
       if (aIID.equals(Ci.nsIStreamListener) ||
           aIID.equals(Ci.nsIRequestObserver) ||
           aIID.equals(Ci.nsISupports))
         return this;
       throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
-    onStartRequest: function(aRequest, aContext) {},
+    onStartRequest: function(aRequest) {},
 
-    onStopRequest: function(aRequest, aContext, aStatusCode) {
+    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) {}
   };
--- a/netwerk/test/unit/test_content_sniffer.js
+++ b/netwerk/test/unit/test_content_sniffer.js
@@ -34,17 +34,17 @@ var sniffer = {
   },
 
   getMIMETypeFromContent: function (request, data, length) {
     return sniffedType;
   }
 };
 
 var listener = {
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     try {
       var chan = request.QueryInterface(Ci.nsIChannel);
       if (chan.contentType == unknownType)
         do_throw("Type should not be unknown!");
       if (sniffing_enabled && this._iteration > 2 &&
           chan.contentType != sniffedType) {
         do_throw("Expecting <" + sniffedType +"> but got <" +
                  chan.contentType + "> for " + chan.URI.spec);
@@ -57,17 +57,17 @@ var listener = {
 
     throw Cr.NS_ERROR_ABORT;
   },
 
   onDataAvailable: function test_ODA() {
     throw Cr.NS_ERROR_UNEXPECTED;
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     run_test_iteration(this._iteration);
     do_test_finished();
   },
 
   _iteration: 1
 };
 
 function makeChan(url) {
--- a/netwerk/test/unit/test_cookie_header.js
+++ b/netwerk/test/unit/test_cookie_header.js
@@ -22,32 +22,32 @@ function check_request_header(chan, name
   }
   dump("Value for header '" + name + "' is '" + chanValue + "'\n");
   Assert.equal(chanValue, value);
 }
 
 var cookieVal = "C1=V1";
 
 var listener = {
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     try {
       var chan = request.QueryInterface(Ci.nsIHttpChannel);
       check_request_header(chan, "Cookie", cookieVal);
     } catch (e) {
       do_throw("Unexpected exception: " + e);
     }
 
     throw Cr.NS_ERROR_ABORT;
   },
 
   onDataAvailable: function test_ODA() {
     throw Cr.NS_ERROR_UNEXPECTED;
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     if (this._iteration == 1) {
       run_test_continued();
     } else {
       do_test_pending();
       httpserv.stop(do_test_finished);
     }
     do_test_finished();
   },
--- a/netwerk/test/unit/test_crossOriginOpenerPolicy.js
+++ b/netwerk/test/unit/test_crossOriginOpenerPolicy.js
@@ -13,25 +13,25 @@ function inChildProcess() {
 }
 
 class OnStartListener {
   constructor(onStartCallback) {
     this.callback = onStartCallback;
     this.done = new Promise(resolve => { this.resolve = resolve; });
   }
 
-  onStartRequest(request, context) {
+  onStartRequest(request) {
     this.callback(request.QueryInterface(Ci.nsIHttpChannel));
   }
 
   onDataAvailable(request, context, stream, offset, count) {
     let string = NetUtil.readInputStreamToString(stream, count);
   }
 
-  onStopRequest(request, context, status) { this.resolve(); }
+  onStopRequest(request, status) { this.resolve(); }
 }
 
 
 function handler_null(metadata, response)
 {
   info("request_null");
   response.setStatusLine(metadata.httpVersion, 200, "OK");
   response.setHeader("Content-Type", "text/plain", false);
--- a/netwerk/test/unit/test_event_sink.js
+++ b/netwerk/test/unit/test_event_sink.js
@@ -47,17 +47,17 @@ var eventsink = {
   },
 
   called: false
 };
 
 var listener = {
   expectSinkCall: true,
 
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     try {
       // Commenting out this check pending resolution of bug 255119
       //if (Components.isSuccessCode(request.status))
       //  do_throw("Channel should have a failure code!");
 
       // The current URI must be the original URI, as all redirects have been
       // cancelled
       if (!(request instanceof Ci.nsIChannel) ||
@@ -78,17 +78,17 @@ var listener = {
 
     throw Cr.NS_ERROR_ABORT;
   },
 
   onDataAvailable: function test_ODA() {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     if (this._iteration <= 2) {
       run_test_continued();
     } else {
       do_test_pending();
       httpserv.stop(do_test_finished);
     }
     do_test_finished();
   },
--- a/netwerk/test/unit/test_file_protocol.js
+++ b/netwerk/test/unit/test_file_protocol.js
@@ -69,17 +69,17 @@ FileStreamListener.prototype = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     if (this._got_onstartrequest)
       do_throw("Got second onStartRequest event!");
     this._got_onstartrequest = true;
 
     if (!this._isDir(request)) {
       request.QueryInterface(Ci.nsIChannel);
       this._contentLen = request.contentLength;
       if (this._contentLen == -1)
@@ -93,17 +93,17 @@ FileStreamListener.prototype = {
     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));
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     if (!this._got_onstartrequest)
       do_throw("onStopRequest without onStartRequest event!");
     if (this._got_onstoprequest)
       do_throw("Got second onStopRequest event!");
     this._got_onstoprequest = true;
     if (!Components.isSuccessCode(status))
       do_throw("Failed to load file: " + status.toString(16));
     if (status != request.status)
--- a/netwerk/test/unit/test_freshconnection.js
+++ b/netwerk/test/unit/test_freshconnection.js
@@ -1,22 +1,22 @@
 // This is essentially a debug mode crashtest to make sure everything
 // involved in a reload runs on the right thread. It relies on the
 // assertions in necko.
 const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
 var listener = {
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
   },
 
   onDataAvailable: function test_ODA() {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     do_test_finished();
   },
 };
 
 function run_test() {
   var chan = NetUtil.newChannel({
     uri: "http://localhost:4444",
     loadUsingSystemPrincipal: true
--- a/netwerk/test/unit/test_getHost.js
+++ b/netwerk/test/unit/test_getHost.js
@@ -7,34 +7,34 @@ var httpserver = new HttpServer();
 httpserver.start(-1);
 const PORT = httpserver.identity.primaryPort;
 
 var gotOnStartRequest = false;
 
 function CheckGetHostListener() {}
 
 CheckGetHostListener.prototype = {
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     dump("*** listener onStartRequest\n");
 
     gotOnStartRequest = true;
 
     request.QueryInterface(Ci.nsIHttpChannelInternal);
     try {
       Assert.equal(request.localAddress, "127.0.0.1");
       Assert.equal(request.localPort > 0, true);
       Assert.notEqual(request.localPort, PORT);
       Assert.equal(request.remoteAddress, "127.0.0.1");
       Assert.equal(request.remotePort, PORT);
     } catch (e) {
       Assert.ok(0, "Get local/remote host/port throws an error!");
     }
   },
 
-  onStopRequest: function(request, context, statusCode) {
+  onStopRequest: function(request, statusCode) {
     dump("*** listener onStopRequest\n");
 
     Assert.equal(gotOnStartRequest, true);
     httpserver.stop(do_test_finished);
   },
 
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIRequestObserver) ||
--- a/netwerk/test/unit/test_http2.js
+++ b/netwerk/test/unit/test_http2.js
@@ -43,17 +43,17 @@ Http2CheckListener.prototype = {
   onStartRequestFired: false,
   onDataAvailableFired: false,
   isHttp2Connection: false,
   shouldBeHttp2 : true,
   accum : 0,
   expected: -1,
   shouldSucceed: true,
 
-  onStartRequest: function testOnStartRequest(request, ctx) {
+  onStartRequest: function testOnStartRequest(request) {
     this.onStartRequestFired = true;
     if (this.shouldSucceed && !Components.isSuccessCode(request.status)) {
       do_throw("Channel should have a success code! (" + request.status + ")");
     } else if (!this.shouldSucceed && Components.isSuccessCode(request.status)) {
       do_throw("Channel succeeded unexpectedly!");
     }
 
     Assert.ok(request instanceof Ci.nsIHttpChannel);
@@ -65,17 +65,17 @@ Http2CheckListener.prototype = {
 
   onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
     this.onDataAvailableFired = true;
     this.isHttp2Connection = checkIsHttp2(request);
     this.accum += cnt;
     read_stream(stream, cnt);
   },
 
-  onStopRequest: function testOnStopRequest(request, ctx, status) {
+  onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(this.onStartRequestFired);
     if (this.expected != -1) {
       Assert.equal(this.accum, this.expected);
     }
     if (this.shouldSucceed) {
       Assert.ok(Components.isSuccessCode(status));
       Assert.ok(this.onDataAvailableFired);
       Assert.ok(this.isHttp2Connection == this.shouldBeHttp2);
@@ -114,17 +114,17 @@ Http2MultiplexListener.prototype.buffer 
 Http2MultiplexListener.prototype.onDataAvailable = function(request, ctx, 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, ctx, status) {
+Http2MultiplexListener.prototype.onStopRequest = function(request, status) {
   Assert.ok(this.onStartRequestFired);
   Assert.ok(this.onDataAvailableFired);
   Assert.ok(this.isHttp2Connection);
   Assert.ok(this.buffer == multiplexContent);
 
   // This is what does most of the hard work for us
   register_completed_channel(this);
 };
@@ -195,17 +195,17 @@ Http2ContinuedHeaderListener.prototype.o
   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);
 };
 
-Http2ContinuedHeaderListener.prototype.onStopRequest = function (request, ctx, status) {
+Http2ContinuedHeaderListener.prototype.onStopRequest = function (request, status) {
   Assert.ok(this.onStartRequestFired);
   Assert.ok(Components.isSuccessCode(status));
   Assert.ok(this.onDataAvailableFired);
   Assert.ok(this.isHttp2Connection);
 
   --this.onStopsLeft;
   if (this.onStopsLeft === 0) {
     run_next_test();
@@ -231,17 +231,17 @@ Http2BigListener.prototype.onDataAvailab
   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"));
 };
 
-Http2BigListener.prototype.onStopRequest = function(request, ctx, status) {
+Http2BigListener.prototype.onStopRequest = function(request, status) {
   Assert.ok(this.onStartRequestFired);
   Assert.ok(this.onDataAvailableFired);
   Assert.ok(this.isHttp2Connection);
 
   // Don't want to flood output, so don't use do_check_eq
   Assert.ok(this.buffer == bigListenerData);
 
   run_next_test();
@@ -255,17 +255,17 @@ Http2HugeSuspendedListener.prototype.cou
 
 Http2HugeSuspendedListener.prototype.onDataAvailable = function(request, ctx, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.isHttp2Connection = checkIsHttp2(request);
   this.count += cnt;
   read_stream(stream, cnt);
 };
 
-Http2HugeSuspendedListener.prototype.onStopRequest = function(request, ctx, status) {
+Http2HugeSuspendedListener.prototype.onStopRequest = function(request, status) {
   Assert.ok(this.onStartRequestFired);
   Assert.ok(this.onDataAvailableFired);
   Assert.ok(this.isHttp2Connection);
   Assert.equal(this.count, 1024 * 1024 * 1); // 1mb of data expected
   run_next_test();
   do_test_finished();
 };
 
@@ -293,33 +293,33 @@ var ResumeStalledChannelListener = funct
 
 ResumeStalledChannelListener.prototype = {
   onStartRequestFired: false,
   onDataAvailableFired: false,
   isHttp2Connection: false,
   shouldBeHttp2 : true,
   resumable : null,
 
-  onStartRequest: function testOnStartRequest(request, ctx) {
+  onStartRequest: function testOnStartRequest(request) {
     this.onStartRequestFired = true;
     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) {
     this.onDataAvailableFired = true;
     this.isHttp2Connection = checkIsHttp2(request);
     read_stream(stream, cnt);
   },
 
-  onStopRequest: function testOnStopRequest(request, ctx, status) {
+  onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(this.onStartRequestFired);
     Assert.ok(Components.isSuccessCode(status));
     Assert.ok(this.onDataAvailableFired);
     Assert.ok(this.isHttp2Connection == this.shouldBeHttp2);
     this.resumable.resume();
   }
 };
 
@@ -395,17 +395,17 @@ var concurrent_channels = [];
 var Http2ConcurrentListener = function() {};
 
 Http2ConcurrentListener.prototype = new Http2CheckListener();
 Http2ConcurrentListener.prototype.count = 0;
 Http2ConcurrentListener.prototype.target = 0;
 Http2ConcurrentListener.prototype.reset = 0;
 Http2ConcurrentListener.prototype.recvdHdr = 0;
 
-Http2ConcurrentListener.prototype.onStopRequest = function(request, ctx, status) {
+Http2ConcurrentListener.prototype.onStopRequest = function(request, status) {
   this.count++;
   Assert.ok(this.isHttp2Connection);
   if (this.recvdHdr > 0) {
     Assert.equal(request.getResponseHeader("X-Recvd"), this.recvdHdr);
   }
 
   if (this.count == this.target) {
     if (this.reset > 0) {
@@ -593,25 +593,25 @@ const {HttpServer} = ChromeUtils.import(
 const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
 var httpserv = null;
 var httpserv2 = null;
 var ios = Cc["@mozilla.org/network/io-service;1"]
             .getService(Ci.nsIIOService);
 
 var altsvcClientListener = {
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     Assert.equal(request.status, Cr.NS_OK);
   },
 
   onDataAvailable: function test_ODA(request, cx, stream, offset, cnt) {
    read_stream(stream, cnt);
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  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")
                 .QueryInterface(Ci.nsIHttpChannel);
       // we use this header to tell the server to issue a altsvc frame for the
       // speficied origin we will use in the next part of the test
       chan.setRequestHeader("x-redirect-origin",
@@ -624,25 +624,25 @@ var altsvcClientListener = {
                 .QueryInterface(Ci.nsIHttpChannel);
       chan.loadFlags = Ci.nsIRequest.LOAD_BYPASS_CACHE;
       chan.asyncOpen(altsvcClientListener2);
     }
   }
 };
 
 var altsvcClientListener2 = {
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     Assert.equal(request.status, Cr.NS_OK);
   },
 
   onDataAvailable: function test_ODA(request, cx, stream, offset, cnt) {
    read_stream(stream, cnt);
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  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")
                 .QueryInterface(Ci.nsIHttpChannel);
       chan.loadFlags = Ci.nsIRequest.LOAD_BYPASS_CACHE;
       chan.asyncOpen(altsvcClientListener2);
     } else {
@@ -727,17 +727,17 @@ Http2PushApiListener.prototype = {
     if (pushChannel.originalURI.spec == "https://localhost:" + serverPort + "/pushapi1/2") {
       pushChannel.cancel(Cr.NS_ERROR_ABORT);
     } else if (pushChannel.originalURI.spec == "https://localhost:" + serverPort + "/pushapi1/3") {
       Assert.ok(pushChannel.getRequestHeader("Accept-Encoding").includes("br"));
     }
   },
 
  // normal Channel listeners
-  onStartRequest: function pushAPIOnStart(request, ctx) {
+  onStartRequest: function pushAPIOnStart(request) {
   },
 
   onDataAvailable: function pushAPIOnDataAvailable(request, ctx, 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") {
@@ -749,17 +749,17 @@ Http2PushApiListener.prototype = {
     } else if (request.originalURI.spec == "https://localhost:" + serverPort + "/pushapi1/3") {
       Assert.equal(data[0], '3');
       --this.checksPending;
     } else {
       Assert.equal(true, false);
     }
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     if (request.originalURI.spec == "https://localhost:" + serverPort + "/pushapi1/2") {
       Assert.equal(request.status, Cr.NS_ERROR_ABORT);
     } else {
       Assert.equal(request.status, Cr.NS_OK);
     }
 
     --this.checksPending; // 5 times - one for each push plus the pull
     if (!this.checksPending) {
@@ -782,17 +782,17 @@ function test_http2_pushapi_1() {
   var listener = new Http2PushApiListener();
   chan.notificationCallbacks = listener;
   chan.asyncOpen(listener);
 }
 
 var WrongSuiteListener = function() {};
 WrongSuiteListener.prototype = new Http2CheckListener();
 WrongSuiteListener.prototype.shouldBeHttp2 = false;
-WrongSuiteListener.prototype.onStopRequest = function(request, ctx, status) {
+WrongSuiteListener.prototype.onStopRequest = function(request, status) {
   prefs.setBoolPref("security.ssl3.ecdhe_rsa_aes_128_gcm_sha256", true);
   prefs.clearUserPref("security.tls.version.max");
   Http2CheckListener.prototype.onStopRequest.call(this);
 };
 
 // test that we use h1 without the mandatory cipher suite available when
 // offering at most tls1.2
 function test_http2_wrongsuite_tls12() {
@@ -820,17 +820,17 @@ function test_http2_h11required_stream()
   var listener = new Http2CheckListener();
   listener.shouldBeHttp2 = false;
   chan.asyncOpen(listener);
 }
 
 function H11RequiredSessionListener () { }
 H11RequiredSessionListener.prototype = new Http2CheckListener();
 
-H11RequiredSessionListener.prototype.onStopRequest = function (request, ctx, status) {
+H11RequiredSessionListener.prototype.onStopRequest = function (request, status) {
   var streamReused = request.getResponseHeader("X-H11Required-Stream-Ok");
   Assert.equal(streamReused, "yes");
 
   Assert.ok(this.onStartRequestFired);
   Assert.ok(this.onDataAvailableFired);
   Assert.ok(this.isHttp2Connection == this.shouldBeHttp2);
 
   run_next_test();
@@ -857,33 +857,33 @@ function test_http2_continuations() {
   chan.notificationCallbacks = listener;
   chan.asyncOpen(listener);
 }
 
 function Http2IllegalHpackValidationListener() { }
 Http2IllegalHpackValidationListener.prototype = new Http2CheckListener();
 Http2IllegalHpackValidationListener.prototype.shouldGoAway = false;
 
-Http2IllegalHpackValidationListener.prototype.onStopRequest = function (request, ctx, status) {
+Http2IllegalHpackValidationListener.prototype.onStopRequest = function (request, status) {
   var wentAway = (request.getResponseHeader('X-Did-Goaway') === 'yes');
   Assert.equal(wentAway, this.shouldGoAway);
 
   Assert.ok(this.onStartRequestFired);
   Assert.ok(this.onDataAvailableFired);
   Assert.ok(this.isHttp2Connection == this.shouldBeHttp2);
 
   run_next_test();
   do_test_finished();
 };
 
 function Http2IllegalHpackListener() { }
 Http2IllegalHpackListener.prototype = new Http2CheckListener();
 Http2IllegalHpackListener.prototype.shouldGoAway = false;
 
-Http2IllegalHpackListener.prototype.onStopRequest = function (request, ctx, status) {
+Http2IllegalHpackListener.prototype.onStopRequest = function (request, status) {
   var chan = makeChan("https://localhost:" + serverPort + "/illegalhpack_validate");
   var listener = new Http2IllegalHpackValidationListener();
   listener.shouldGoAway = this.shouldGoAway;
   chan.asyncOpen(listener);
 };
 
 function test_http2_illegalhpacksoft() {
   var chan = makeChan("https://localhost:" + serverPort + "/illegalhpacksoft");
@@ -975,46 +975,46 @@ PulledDiskCacheListener.prototype = new 
 PulledDiskCacheListener.prototype.EXPECTED_DATA = "this was pulled via h2";
 PulledDiskCacheListener.prototype.readData = "";
 PulledDiskCacheListener.prototype.onDataAvailable = function testOnDataAvailable(request, ctx, 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, ctx, status) {
+PulledDiskCacheListener.prototype.onStopRequest = function testOnStopRequest(request, status) {
   Assert.equal(this.EXPECTED_DATA, this.readData);
-  Http2CheckListener.prorotype.onStopRequest.call(this, request, ctx, status);
+  Http2CheckListener.prorotype.onStopRequest.call(this, request, status);
 };
 
 const DISK_CACHE_DATA = "this is from disk cache";
 
 var FromDiskCacheListener = function() {};
 FromDiskCacheListener.prototype = {
   onStartRequestFired: false,
   onDataAvailableFired: false,
   readData: "",
 
-  onStartRequest: function testOnStartRequest(request, ctx) {
+  onStartRequest: function testOnStartRequest(request) {
     this.onStartRequestFired = true;
     if (!Components.isSuccessCode(request.status)) {
       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) {
     this.onDataAvailableFired = true;
     this.readData += read_stream(stream, cnt);
   },
 
-  onStopRequest: function testOnStopRequest(request, ctx, status) {
+  onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(this.onStartRequestFired);
     Assert.ok(Components.isSuccessCode(status));
     Assert.ok(this.onDataAvailableFired);
     Assert.equal(this.readData, DISK_CACHE_DATA);
 
     evict_cache_entries("disk");
     syncWithCacheIOThread(() => {
       // Now that we know the entry is out of the disk cache, check to make sure
@@ -1027,17 +1027,17 @@ FromDiskCacheListener.prototype = {
     });
   }
 };
 
 var Http2DiskCachePushListener = function() {};
 
 Http2DiskCachePushListener.prototype = new Http2CheckListener();
 
-Http2DiskCachePushListener.onStopRequest = function(request, ctx, status) {
+Http2DiskCachePushListener.onStopRequest = function(request, status) {
     Assert.ok(this.onStartRequestFired);
     Assert.ok(Components.isSuccessCode(status));
     Assert.ok(this.onDataAvailableFired);
     Assert.ok(this.isHttp2Connection == this.shouldBeHttp2);
 
     // Now we need to open a channel to ensure we get data from the disk cache
     // for the pushed item, instead of from the push cache.
     var chan = makeChan("https://localhost:" + serverPort + "/diskcache");
@@ -1074,17 +1074,17 @@ function test_complete() {
   httpserv2.stop(do_test_finished);
 
   do_test_finished();
   do_timeout(0,run_next_test);
 }
 
 var Http2DoublepushListener = function () {};
 Http2DoublepushListener.prototype = new Http2CheckListener();
-Http2DoublepushListener.prototype.onStopRequest = function (request, ctx, status) {
+Http2DoublepushListener.prototype.onStopRequest = function (request, status) {
   Assert.ok(this.onStartRequestFired);
   Assert.ok(Components.isSuccessCode(status));
   Assert.ok(this.onDataAvailableFired);
   Assert.ok(this.isHttp2Connection == this.shouldBeHttp2);
 
   var chan = makeChan("https://localhost:" + serverPort + "/doublypushed");
   var listener = new Http2DoublypushedListener();
   chan.loadGroup = loadGroup;
@@ -1094,17 +1094,17 @@ Http2DoublepushListener.prototype.onStop
 var Http2DoublypushedListener = function () {};
 Http2DoublypushedListener.prototype = new Http2CheckListener();
 Http2DoublypushedListener.prototype.readData = "";
 Http2DoublypushedListener.prototype.onDataAvailable = function (request, ctx, stream, off, cnt) {
   this.onDataAvailableFired = true;
   this.accum += cnt;
   this.readData += read_stream(stream, cnt);
 };
-Http2DoublypushedListener.prototype.onStopRequest = function (request, ctx, status) {
+Http2DoublypushedListener.prototype.onStopRequest = function (request, status) {
   Assert.ok(this.onStartRequestFired);
   Assert.ok(Components.isSuccessCode(status));
   Assert.ok(this.onDataAvailableFired);
   Assert.equal(this.readData, "pushed");
 
   run_next_test();
   do_test_finished();
 };
--- a/netwerk/test/unit/test_httpResponseTimeout.js
+++ b/netwerk/test/unit/test_httpResponseTimeout.js
@@ -22,23 +22,23 @@ const prefService = Cc["@mozilla.org/pre
 
 var server = new HttpServer();
 
 function TimeoutListener(expectResponse) {
   this.expectResponse = expectResponse;
 }
 
 TimeoutListener.prototype = {
-  onStartRequest: function (request, ctx) {
+  onStartRequest: function (request) {
   },
 
   onDataAvailable: function (request, ctx, stream) {
   },
 
-  onStopRequest: function (request, ctx, status) {
+  onStopRequest: function (request, status) {
     if (this.expectResponse) {
       Assert.equal(status, Cr.NS_OK);
     } else {
       Assert.equal(status, Cr.NS_ERROR_NET_TIMEOUT);
     }
 
     run_next_test();
   },
--- a/netwerk/test/unit/test_httpcancel.js
+++ b/netwerk/test/unit/test_httpcancel.js
@@ -34,17 +34,17 @@ var observer = {
 
     var obs = Cc["@mozilla.org/observer-service;1"].getService();
     obs = obs.QueryInterface(Ci.nsIObserverService);
     obs.removeObserver(observer, "http-on-modify-request");
   }
 };
 
 var listener = {
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     Assert.equal(request.status, Cr.NS_BINDING_ABORTED);
 
     // ENSURE_CALLED_BEFORE_CONNECT: setting referrer should now fail
     try {
       request.QueryInterface(Ci.nsIHttpChannel);
       currentReferrer = request.getRequestHeader("Referer");
       Assert.equal(currentReferrer, "http://site2.com/");
       var uri = ios.newURI("http://site3.com/");
@@ -62,17 +62,17 @@ var listener = {
       do_throw("Exception: " + ex);
     }
   },
 
   onDataAvailable: function test_ODA() {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     httpserv.stop(do_test_finished);
   }
 };
 
 function makeChan(url) {
   var chan = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true})
                     .QueryInterface(Ci.nsIHttpChannel);
 
--- a/netwerk/test/unit/test_httpsuspend.js
+++ b/netwerk/test/unit/test_httpsuspend.js
@@ -18,17 +18,17 @@ var listener = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, ctx) {
+  onStartRequest: function(request) {
     this._lastEvent = Date.now();
     request.QueryInterface(Ci.nsIRequest);
 
     // 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(); });
@@ -43,17 +43,17 @@ var listener = {
     request.suspend();
     request.suspend();
     request.resume();
     request.resume();
 
     this._gotData = true;
   },
 
-  onStopRequest: function(request, ctx, status) {
+  onStopRequest: function(request, status) {
     Assert.ok(this._gotData);
     httpserv.stop(do_test_finished);
   }
 };
 
 function makeChan(url) {
   return NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true})
                 .QueryInterface(Ci.nsIHttpChannel);
--- a/netwerk/test/unit/test_immutable.js
+++ b/netwerk/test/unit/test_immutable.js
@@ -67,34 +67,34 @@ function makeChan(origin, path) {
 }
 
 var nextTest;
 var expectPass = true;
 var expectConditional = false;
 
 var Listener = function() {};
 Listener.prototype = {
-  onStartRequest: function testOnStartRequest(request, ctx) {
+  onStartRequest: function testOnStartRequest(request) {
     Assert.ok(request instanceof Ci.nsIHttpChannel);
 
     if (expectPass) {
       if (!Components.isSuccessCode(request.status)) {
         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) {
     read_stream(stream, cnt);
   },
 
-  onStopRequest: function testOnStopRequest(request, ctx, status) {
+  onStopRequest: function testOnStopRequest(request, status) {
       if (expectConditional) {
         Assert.equal(request.getResponseHeader("x-conditional"), "true");
       } else {
 	  try { Assert.notEqual(request.getResponseHeader("x-conditional"), "true"); }
 	  catch (e) { Assert.ok(true); }
     }
     nextTest();
     do_test_finished();
--- a/netwerk/test/unit/test_mismatch_last-modified.js
+++ b/netwerk/test/unit/test_mismatch_last-modified.js
@@ -23,26 +23,26 @@ var listener_3 = {
     QueryInterface: function(iid) {
 	if (iid.equals(Ci.nsIStreamListener) ||
             iid.equals(Ci.nsIRequestObserver) ||
             iid.equals(Ci.nsISupports))
 	    return this;
 	throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
-    onStartRequest: function test_onStartR(request, ctx) {},
+    onStartRequest: function test_onStartR(request) {},
     
     onDataAvailable: function test_ODA(request, cx, inputStream,
                                        offset, count) {
 	var data = new BinaryInputStream(inputStream).readByteArray(count);
       
 	Assert.equal(data[0], "B".charCodeAt(0));
     },
 
-    onStopRequest: function test_onStopR(request, ctx, status) {
+    onStopRequest: function test_onStopR(request, status) {
 	httpserver.stop(do_test_finished);
     }
 };
 
 XPCOMUtils.defineLazyGetter(this, "listener_2", function() {
     return {
     // this listener is used to process the revalidation of the
     // corrupted cache entry. its revalidation prompts it to be cleaned
@@ -50,29 +50,29 @@ XPCOMUtils.defineLazyGetter(this, "liste
     QueryInterface: function(iid) {
 	if (iid.equals(Ci.nsIStreamListener) ||
             iid.equals(Ci.nsIRequestObserver) ||
             iid.equals(Ci.nsISupports))
 	    return this;
 	throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
-    onStartRequest: function test_onStartR(request, ctx) {},
+    onStartRequest: function test_onStartR(request) {},
     
     onDataAvailable: function test_ODA(request, cx, 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));
     },
 
-    onStopRequest: function test_onStopR(request, ctx, status) {
+    onStopRequest: function test_onStopR(request, status) {
     var channel = request.QueryInterface(Ci.nsIHttpChannel);
     var chan = NetUtil.newChannel({
       uri: "http://localhost:" + httpserver.identity.primaryPort + "/test1",
       loadUsingSystemPrincipal: true
     });
     chan.asyncOpen(listener_3);
     }
 };
@@ -86,25 +86,25 @@ XPCOMUtils.defineLazyGetter(this, "liste
     QueryInterface: function(iid) {
 	if (iid.equals(Ci.nsIStreamListener) ||
             iid.equals(Ci.nsIRequestObserver) ||
             iid.equals(Ci.nsISupports))
 	    return this;
 	throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
-    onStartRequest: function test_onStartR(request, ctx) {},
+    onStartRequest: function test_onStartR(request) {},
     
     onDataAvailable: function test_ODA(request, cx, inputStream,
                                        offset, count) {
 	var data = new BinaryInputStream(inputStream).readByteArray(count);
 	Assert.equal(data[0], "A".charCodeAt(0));
     },
 
-    onStopRequest: function test_onStopR(request, ctx, status) {
+    onStopRequest: function test_onStopR(request, status) {
     var channel = request.QueryInterface(Ci.nsIHttpChannel);
     var chan = NetUtil.newChannel({
       uri: "http://localhost:" + httpserver.identity.primaryPort + "/test1",
       loadUsingSystemPrincipal: true
     });
 	  chan.asyncOpen(listener_2);
     }
 };
--- a/netwerk/test/unit/test_multipart_byteranges.js
+++ b/netwerk/test/unit/test_multipart_byteranges.js
@@ -67,30 +67,30 @@ var multipartListener = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     this._buffer = "";
   },
 
   onDataAvailable: function(request, context, 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);
     }
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     try {
       responseHandler(request, this._buffer);
     } catch (ex) {
       do_throw("Error in closure function: " + ex);
     }
   }
 };
 
--- a/netwerk/test/unit/test_multipart_streamconv-byte-by-byte.js
+++ b/netwerk/test/unit/test_multipart_streamconv-byte-by-byte.js
@@ -61,30 +61,30 @@ var multipartListener = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     this._buffer = "";
   },
 
   onDataAvailable: function(request, context, 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);
     }
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     this._index++;
     // Second part should be last part
     Assert.equal(request.QueryInterface(Ci.nsIMultiPartChannel).isLastPart, this._index == testData.length);
     try {
       responseHandler(request, this._buffer);
     } catch (ex) {
       do_throw("Error in closure function: " + ex);
     }
--- a/netwerk/test/unit/test_multipart_streamconv.js
+++ b/netwerk/test/unit/test_multipart_streamconv.js
@@ -45,30 +45,30 @@ var multipartListener = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     this._buffer = "";
   },
 
   onDataAvailable: function(request, context, 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);
     }
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     this._index++;
     // Second part should be last part
     Assert.equal(request.QueryInterface(Ci.nsIMultiPartChannel).isLastPart, this._index == testData.length);
     try {
       responseHandler(request, this._buffer);
     } catch (ex) {
       do_throw("Error in closure function: " + 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
@@ -43,30 +43,30 @@ var multipartListener = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     this._buffer = "";
   },
 
   onDataAvailable: function(request, context, 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);
     }
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     try {
       responseHandler(request, this._buffer);
     } catch (ex) {
       do_throw("Error in closure function: " + ex);
     }
   }
 };
 
--- a/netwerk/test/unit/test_multipart_streamconv_missing_lead_boundary.js
+++ b/netwerk/test/unit/test_multipart_streamconv_missing_lead_boundary.js
@@ -43,30 +43,30 @@ var multipartListener = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     this._buffer = "";
   },
 
   onDataAvailable: function(request, context, 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);
     }
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     try {
       responseHandler(request, this._buffer);
     } catch (ex) {
       do_throw("Error in closure function: " + ex);
     }
   }
 };
 
--- a/netwerk/test/unit/test_origin.js
+++ b/netwerk/test/unit/test_origin.js
@@ -68,53 +68,53 @@ var nextTest;
 var nextPortExpectedToBeSame = false;
 var currentPort = 0;
 var forceReload = false;
 var forceFailListener = false;
 
 var Listener = function() {};
 Listener.prototype.clientPort = 0;
 Listener.prototype = {
-  onStartRequest: function testOnStartRequest(request, ctx) {
+  onStartRequest: function testOnStartRequest(request) {
     Assert.ok(request instanceof Ci.nsIHttpChannel);
 
     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) {
     read_stream(stream, cnt);
   },
 
-  onStopRequest: function testOnStopRequest(request, ctx, status) {
+  onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(Components.isSuccessCode(status));
     if (nextPortExpectedToBeSame) {
      Assert.equal(currentPort, this.clientPort);
     } else {
      Assert.notEqual(currentPort, this.clientPort);
     }
     currentPort = this.clientPort;
     nextTest();
     do_test_finished();
   }
 };
 
 var FailListener = function() {};
 FailListener.prototype = {
-  onStartRequest: function testOnStartRequest(request, ctx) {
+  onStartRequest: function testOnStartRequest(request) {
     Assert.ok(request instanceof Ci.nsIHttpChannel);
     Assert.ok(!Components.isSuccessCode(request.status));
   },
   onDataAvailable: function testOnDataAvailable(request, ctx, stream, off, cnt) {
     read_stream(stream, cnt);
   },
-  onStopRequest: function testOnStopRequest(request, ctx, status) {
+  onStopRequest: function testOnStopRequest(request, status) {
     Assert.ok(!Components.isSuccessCode(request.status));
     nextTest();
     do_test_finished();
   }
 };
 
 function testsDone()
 {
@@ -289,25 +289,25 @@ Http2PushApiListener.prototype = {
     } else {
       // any push of bar or madeup should not end up in onPush()
       Assert.equal(true, false);
     }
     pushChannel.cancel(Cr.NS_ERROR_ABORT);
   },
 
  // normal Channel listeners
-  onStartRequest: function pushAPIOnStart(request, ctx) {
+  onStartRequest: function pushAPIOnStart(request) {
     dump("push api onstart " + request.originalURI.spec + "\n");
   },
 
   onDataAvailable: function pushAPIOnDataAvailable(request, ctx, stream, offset, cnt) {
     var data = read_stream(stream, cnt);
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     dump("push api onstop " + request.originalURI.spec + "\n");
     Assert.ok(this.fooOK);
     Assert.ok(this.alt1OK);
     nextTest();
     do_test_finished();
   }
 };
 
--- a/netwerk/test/unit/test_plaintext_sniff.js
+++ b/netwerk/test/unit/test_plaintext_sniff.js
@@ -83,17 +83,17 @@ function makeChan(headerIdx, bodyIdx) {
   chan.loadFlags |=
     Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS;
 
   return chan;
 }
 
 function makeListener(headerIdx, bodyIdx) {
   var listener = {
-    onStartRequest : function test_onStartR(request, ctx) {
+    onStartRequest : function test_onStartR(request) {
       try {
         var chan = request.QueryInterface(Ci.nsIChannel);
 
         Assert.equal(chan.status, Cr.NS_OK);
         
         var type = chan.contentType;
 
         var expectedType =
@@ -117,17 +117,17 @@ function makeListener(headerIdx, bodyIdx
 
       throw Cr.NS_ERROR_ABORT;
     },
 
     onDataAvailable: function test_ODA() {
       do_throw("Should not get any data!");
     },
 
-    onStopRequest: function test_onStopR(request, ctx, status) {
+    onStopRequest: function test_onStopR(request, status) {
       // Advance to next test
       ++headerIdx;
       if (headerIdx == contentTypeHeaderList.length) {
         headerIdx = 0;
         ++bodyIdx;
       }
 
       if (bodyIdx == bodyList.length) {
--- a/netwerk/test/unit/test_predictor.js
+++ b/netwerk/test/unit/test_predictor.js
@@ -421,25 +421,25 @@ var prefetch_sruri;
 function prefetchHandler(metadata, response) {
   response.setStatusLine(metadata.httpVersion, 200, "OK");
   var body = "Success (meow meow meow).";
 
   response.bodyOutputStream.write(body, body.length);
 }
 
 var prefetchListener = {
-  onStartRequest: function(request, ctx) {
+  onStartRequest: function(request) {
     Assert.equal(request.status, Cr.NS_OK);
   },
 
   onDataAvailable: function(request, cx, stream, offset, cnt) {
     read_stream(stream, cnt);
   },
 
-  onStopRequest: function(request, ctx, status) {
+  onStopRequest: function(request, status) {
     run_next_test();
   }
 };
 
 function test_prefetch_setup() {
   // Disable preconnects and preresolves
   Services.prefs.setIntPref("network.predictor.preconnect-min-confidence", 101);
   Services.prefs.setIntPref("network.predictor.preresolve-min-confidence", 101);
--- a/netwerk/test/unit/test_progress.js
+++ b/netwerk/test/unit/test_progress.js
@@ -38,38 +38,38 @@ var progressCallback = {
   getInterface: function (iid) {
     if (iid.equals(Ci.nsIProgressEventSink) ||
         iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     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, context);
+    this._listener.onStartRequest(request);
   },
 
   onDataAvailable: function(request, context, 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);
   },
 
-  onStopRequest: function(request, context, status) {
+  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, context, status);
+    this._listener.onStopRequest(request, status);
     delete this._listener;
   },
 
   onProgress: function (request, context, progress, progressMax) {
     Assert.equal(this._last_callback_handled, TYPE_ONSTATUS);
     this._last_callback_handled = TYPE_ONPROGRESS;
 
     Assert.equal(mStatus, STATUS_RECEIVING_FROM);
--- a/netwerk/test/unit/test_protocolproxyservice.js
+++ b/netwerk/test/unit/test_protocolproxyservice.js
@@ -937,20 +937,20 @@ function failed_script_callback(pi)
     loadUsingSystemPrincipal: true
   });
   chan.asyncOpen(directFilterListener);
 }
 
 var directFilterListener = {
   onModifyRequestCalled : false,
 
-  onStartRequest: function test_onStart(request, ctx) {  },
+  onStartRequest: function test_onStart(request) {  },
   onDataAvailable: function test_OnData() { },
 
-  onStopRequest: function test_onStop(request, ctx, status) {
+  onStopRequest: function test_onStop(request, status) {
     // check on the PI from the channel itself
     request.QueryInterface(Ci.nsIProxiedChannel);
     check_proxy(request.proxyInfo, "http", "127.0.0.1", 7246, 0, 0, false);
     pps.unregisterFilter(directFilter);
 
     // check on the PI from on-modify-request
     Assert.ok(this.onModifyRequestCalled);
     var obs = Cc["@mozilla.org/observer-service;1"].getService();
--- a/netwerk/test/unit/test_proxyconnect.js
+++ b/netwerk/test/unit/test_proxyconnect.js
@@ -60,24 +60,24 @@ var streamIn;
 var streamOut;
 var accepted = false;
 var acceptedSocket;
 var state = STATE_NONE;
 var transportAvailable = false;
 var listener = {
   expectedCode: -1, // uninitialized
 
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
   },
 
   onDataAvailable: function test_ODA() {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     if (state === STATE_COMPLETED) {
       Assert.equal(transportAvailable, false, 'transport available not called');
       Assert.equal(status, 0x80004005, 'error code matches');
 
       nextTest();
       return;
     }
 
--- a/netwerk/test/unit/test_range_requests.js
+++ b/netwerk/test/unit/test_range_requests.js
@@ -46,23 +46,23 @@ function Canceler(continueFn) {
 Canceler.prototype = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
-  onStartRequest: function(request, context) { },
+  onStartRequest: function(request) { },
 
   onDataAvailable: function(request, context, stream, offset, count) {
     request.QueryInterface(Ci.nsIChannel)
            .cancel(Cr.NS_BINDING_ABORTED);
   },
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     Assert.equal(status, Cr.NS_BINDING_ABORTED);
     this.continueFn(request, null);
   }
 };
 // Simple StreamListener which performs no validations
 function MyListener(continueFn) {
   this.continueFn = continueFn;
   this._buffer = null;
@@ -70,43 +70,43 @@ function MyListener(continueFn) {
 MyListener.prototype = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
-  onStartRequest: function(request, context) { this._buffer = ""; },
+  onStartRequest: function(request) { this._buffer = ""; },
 
   onDataAvailable: function(request, context, stream, offset, count) {
     this._buffer = this._buffer.concat(read_stream(stream, count));
   },
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     this.continueFn(request, this._buffer);
   }
 };
 
 var case_8_range_request = false;
 function FailedChannelListener(continueFn) {
   this.continueFn = continueFn;
 }
 FailedChannelListener.prototype = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
-  onStartRequest: function(request, context) { },
+  onStartRequest: function(request) { },
 
   onDataAvailable: function(request, context, stream, offset, count) { },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     if (case_8_range_request)
       Assert.equal(status, Cr.NS_ERROR_CORRUPTED_CONTENT);
     this.continueFn(request, null);
   }
 };
 
 function received_cleartext(request, data) {
   Assert.equal(clearTextBody, data);
--- a/netwerk/test/unit/test_reentrancy.js
+++ b/netwerk/test/unit/test_reentrancy.js
@@ -28,17 +28,17 @@ var listener = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, ctx) {
+  onStartRequest: function(request) {
     switch(this._test) {
       case 0:
         request.suspend();
         syncXHR();
         request.resume();
         break;
       case 1:
         request.suspend();
@@ -56,17 +56,17 @@ var listener = {
   },
 
   onDataAvailable: function(request, context, stream, offset, count) {
     Assert.ok(this._done_onStart);
     read_stream(stream, count);
     this._done_onData = true;
   },
 
-  onStopRequest: function(request, ctx, status) {
+  onStopRequest: function(request, status) {
     Assert.ok(this._done_onData);
     this._reset();
     if (this._test <= MAX_TESTS)
       next_test();
     else
       httpserver.stop(do_test_finished);      
   },
 
--- a/netwerk/test/unit/test_reopen.js
+++ b/netwerk/test/unit/test_reopen.js
@@ -65,27 +65,27 @@ function check_open_throws(error) {
 
 function check_async_open_throws(error) {
   check_throws(function() {
     chan.asyncOpen(listener);
   }, error);
 }
 
 var listener = {
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     check_async_open_throws(NS_ERROR_IN_PROGRESS);
   },
 
   onDataAvailable: function test_ODA(request, cx, inputStream,
                                      offset, count) {
     new BinaryInputStream(inputStream).readByteArray(count); // required by API
     check_async_open_throws(NS_ERROR_IN_PROGRESS);
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     // Once onStopRequest is reached, the channel is marked as having been
     // opened
     check_async_open_throws(NS_ERROR_ALREADY_OPENED);
     do_timeout(0, after_channel_closed);
   }
 };
 
 function after_channel_closed() {
--- a/netwerk/test/unit/test_resumable_truncate.js
+++ b/netwerk/test/unit/test_resumable_truncate.js
@@ -41,25 +41,25 @@ Canceler.prototype = {
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIStreamListener) ||
         iid.equals(Ci.nsIRequestObserver) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
   },
 
   onDataAvailable: function(request, context, stream, offset, count) {
     request.QueryInterface(Ci.nsIChannel)
            .cancel(Cr.NS_BINDING_ABORTED);
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest: function(request, status) {
     Assert.equal(status, Cr.NS_BINDING_ABORTED);
     this.continueFn();
   }
 };
 
 function finish_test() {
   httpserver.stop(do_test_finished);
 }
--- a/netwerk/test/unit/test_separate_connections.js
+++ b/netwerk/test/unit/test_separate_connections.js
@@ -33,17 +33,17 @@ function makeChan(url, userContextId) {
 let previousHashKeys = [];
 
 function Listener(userContextId) {
   this.userContextId = userContextId;
 }
 
 let gTestsRun = 0;
 Listener.prototype = {
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     request.QueryInterface(Ci.nsIHttpChannel)
            .QueryInterface(Ci.nsIHttpChannelInternal);
 
     Assert.equal(request.loadInfo.originAttributes.userContextId, this.userContextId);
 
     let hashKey = request.connectionInfoHashKey;
     if (gSecondRoundStarted) {
       // Compare the hash keys with the previous set ones.
--- a/netwerk/test/unit/test_streamcopier.js
+++ b/netwerk/test/unit/test_streamcopier.js
@@ -19,22 +19,20 @@ function run_test() {
                        .createInstance(Ci.nsIAsyncStreamCopier);
   streamCopier.init(inStr, pipe.outputStream, null, true, true, 1024, true, true);
 
   var ctx = {
   };
   ctx.wrappedJSObject = ctx;
   
   var observer = {
-    onStartRequest: function(aRequest, aContext) {
-      Assert.equal(aContext.wrappedJSObject, ctx);
+    onStartRequest: function(aRequest) {
     },
-    onStopRequest: function(aRequest, aContext, aStatusCode) {
+    onStopRequest: function(aRequest, aStatusCode) {
       Assert.equal(aStatusCode, 0);
-      Assert.equal(aContext.wrappedJSObject, ctx);
       var sis =
         Cc["@mozilla.org/scriptableinputstream;1"]
           .createInstance(Ci.nsIScriptableInputStream);
       sis.init(pipe.inputStream);
       var result = "";
       var temp;
       try { // Need this because read() can throw at EOF
         while ((temp = sis.read(1024))) {
--- a/netwerk/test/unit/test_suspend_channel_before_connect.js
+++ b/netwerk/test/unit/test_suspend_channel_before_connect.js
@@ -62,24 +62,24 @@ var requestListenerObserver = {
         chan.cancel(Cr.NS_BINDING_ABORTED);
         chan.resume();
       }, 1000, Ci.nsITimer.TYPE_ONE_SHOT);
     }
   }
 };
 
 var listener = {
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
   },
 
   onDataAvailable: function test_ODA() {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     executeSoon(run_next_test);
   }
 };
 
 // Add observer and start a channel. Observer is going to suspend the channel on
 // "http-on-modify-request" even. If a channel is suspended so early it should
 // not try to connect at all until it is resumed. In this case we are going to
 // wait for some time and cancel the channel before resuming it.
--- a/netwerk/test/unit/test_suspend_channel_on_authRetry.js
+++ b/netwerk/test/unit/test_suspend_channel_on_authRetry.js
@@ -129,17 +129,17 @@ Requestor.prototype = {
   },
 
   prompt: null
 };
 
 var listener = {
   expectedCode: -1, // Uninitialized
 
-  onStartRequest: function test_onStartR(request, ctx) {
+  onStartRequest: function test_onStartR(request) {
     try {
       if (!Components.isSuccessCode(request.status))
         do_throw("Channel should have a success code!");
 
       if (!(request instanceof Ci.nsIHttpChannel))
         do_throw("Expecting an HTTP channel");
 
       Assert.equal(request.responseStatus, this.expectedCode);
@@ -151,17 +151,17 @@ var listener = {
     }
     throw Cr.NS_ERROR_ABORT;
   },
 
   onDataAvailable: function test_ODA() {
     do_throw("Should not get any data!");
   },
 
-  onStopRequest: function test_onStopR(request, ctx, status) {
+  onStopRequest: function test_onStopR(request, status) {
     Assert.equal(status, Cr.NS_ERROR_ABORT);
     if (requestObserver.suspendOnBeforeConnect) {
       Assert.ok(requestObserver.gotOnBeforeConnect && requestObserver.resumeOnBeforeConnect);
     }
     if (requestObserver.suspendOnModifyRequest) {
       Assert.ok(requestObserver.gotOnModifyRequest && requestObserver.resumeOnModifyRequest);
     }
     obs.removeObserver(requestObserver, "http-on-before-connect");
--- a/netwerk/test/unit/test_suspend_channel_on_examine_merged_response.js
+++ b/netwerk/test/unit/test_suspend_channel_on_examine_merged_response.js
@@ -36,25 +36,25 @@ var observer = {
       Assert.equal(observerCalled,false);
       observerCalled = true;
       chan.suspend();
     }
   }
 };
 
 var listener = {
-  onStartRequest: function (request, ctx) {
+  onStartRequest: function (request) {
     buffer = "";
   },
 
   onDataAvailable: function (request, ctx, stream, offset, count) {
     buffer = buffer.concat(read_stream(stream, count));
   },
 
-  onStopRequest: function (request, ctx, status) {
+  onStopRequest: function (request, status) {
     Assert.equal(status, Cr.NS_OK);
     Assert.equal(buffer, "0123456789");
     Assert.equal(channelResumed, true);
     Assert.equal(observerCalled, true);
     test_nr++;
     do_timeout(0, do_test);
   }
 };
--- a/netwerk/test/unit/test_tls_flags_separate_connections.js
+++ b/netwerk/test/unit/test_tls_flags_separate_connections.js
@@ -53,17 +53,17 @@ function makeChan(url, tlsFlags) {
 let previousHashKeys = {};
 
 function Listener(tlsFlags) {
   this.tlsFlags = tlsFlags;
 }
 
 let gTestsRun = 0;
 Listener.prototype = {
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     request.QueryInterface(Ci.nsIHttpChannel)
            .QueryInterface(Ci.nsIHttpChannelInternal);
 
     Assert.equal(request.tlsFlags, this.tlsFlags);
 
     let hashKey = request.connectionInfoHashKey;
     if (gSecondRoundStarted) {
       // Compare the hash keys with the previous set ones.
--- a/netwerk/test/unit/test_traceable_channel.js
+++ b/netwerk/test/unit/test_traceable_channel.js
@@ -14,17 +14,17 @@ var pipe = null;
 var streamSink = null;
 
 var originalBody = "original http response body";
 var gotOnStartRequest = false;
 
 function TracingListener() {}
 
 TracingListener.prototype = {
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     dump("*** tracing listener onStartRequest\n");
 
     gotOnStartRequest = true;
 
     request.QueryInterface(Ci.nsIHttpChannelInternal);
 
 // local/remote addresses broken in e10s: disable for now
     Assert.equal(request.localAddress, "127.0.0.1");
@@ -40,17 +40,17 @@ TracingListener.prototype = {
       newListener.listener = request.setNewListener(newListener);
     } catch(e) {
       dump("TracingListener.onStartRequest swallowing exception: " + e + "\n");
       return; // OK
     }
     do_throw("replaced channel's listener during onStartRequest.");
   },
 
-  onStopRequest: function(request, context, statusCode) {
+  onStopRequest: function(request, statusCode) {
     dump("*** tracing listener onStopRequest\n");
     
     Assert.equal(gotOnStartRequest, true);
 
     try {
       var sin = Cc["@mozilla.org/scriptableinputstream;1"].
           createInstance(Ci.nsIScriptableInputStream);
 
--- a/netwerk/test/unit/test_trackingProtection_annotateChannels.js
+++ b/netwerk/test/unit/test_trackingProtection_annotateChannels.js
@@ -28,31 +28,31 @@ const defaultTopWindowURI = NetUtil.newU
 
 function listener(tracking, priority, throttleable, nextTest) {
   this._tracking = tracking;
   this._priority = priority;
   this._throttleable = throttleable;
   this._nextTest = nextTest;
 }
 listener.prototype = {
-  onStartRequest: function(request, context) {
+  onStartRequest: function(request) {
     Assert.equal(request.QueryInterface(Ci.nsIHttpChannel).isTrackingResource,
                  this._tracking, "tracking flag");
     Assert.equal(request.QueryInterface(Ci.nsISupportsPriority).priority,
                  this._priority, "channel priority");
     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) => {},
-  onStopRequest: (request, context, status) => {},
+  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
 // setting the prefs for us, so here we merely read our prefs, and if they have
--- a/services/common/rest.js
+++ b/services/common/rest.js
@@ -381,17 +381,17 @@ RESTRequest.prototype = {
                     channel.URI.spec);
 
     // Create a new response object.
     this.response = new RESTResponse(this);
 
     this.delayTimeout();
   },
 
-  onStopRequest(channel, context, statusCode) {
+  onStopRequest(channel, statusCode) {
     if (this.timeoutTimer) {
       // Clear the abort timer now that the channel is done.
       this.timeoutTimer.clear();
     }
 
     // We don't want to do anything for a request that's already been aborted.
     if (this.status == this.ABORTED) {
       this._log.trace("Not proceeding with onStopRequest, request was aborted.");
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -2114,26 +2114,26 @@ SpecialPowersAPI.prototype = {
         Components.Constructor("@mozilla.org/binaryinputstream;1",
                                "nsIBinaryInputStream",
                                "setInputStream");
 
     return new Promise(function(resolve) {
       let listener = {
         httpStatus: 0,
 
-        onStartRequest(request, context) {
+        onStartRequest(request) {
           request.QueryInterface(Ci.nsIHttpChannel);
           this.httpStatus = request.responseStatus;
         },
 
         onDataAvailable(request, context, stream, offset, count) {
           new BinaryInputStream(stream).readByteArray(count);
         },
 
-        onStopRequest(request, context, status) {
+        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;
           resolve({status, httpStatus});
         },
       };
       let uri = NetUtil.newURI(url);
--- a/toolkit/components/downloads/DownloadCore.jsm
+++ b/toolkit/components/downloads/DownloadCore.jsm
@@ -1958,18 +1958,18 @@ this.DownloadCopySaver.prototype = {
       // If the callback was set, handle it now before opening the channel.
       if (download.source.adjustChannel) {
         await download.source.adjustChannel(channel);
       }
 
       // Open the channel, directing output to the background file saver.
       backgroundFileSaver.QueryInterface(Ci.nsIStreamListener);
       channel.asyncOpen({
-        onStartRequest: function(aRequest, aContext) {
-          backgroundFileSaver.onStartRequest(aRequest, aContext);
+        onStartRequest: function(aRequest) {
+          backgroundFileSaver.onStartRequest(aRequest);
 
           // Check if the request's response has been blocked by Windows
           // Parental Controls with an HTTP 450 error code.
           if (aRequest instanceof Ci.nsIHttpChannel &&
               aRequest.responseStatus == 450) {
             // Set a flag that can be retrieved later when handling the
             // cancellation so that the proper error can be thrown.
             this.download._blockedByParentalControls = true;
@@ -2039,19 +2039,19 @@ this.DownloadCopySaver.prototype = {
                                           keepPartialData);
           } else {
             // Set the final target file, and delete it on failure.
             backgroundFileSaver.setTarget(new FileUtils.File(targetPath),
                                           false);
           }
         }.bind(copySaver),
 
-        onStopRequest(aRequest, aContext, aStatusCode) {
+        onStopRequest(aRequest, aStatusCode) {
           try {
-            backgroundFileSaver.onStopRequest(aRequest, aContext,
+            backgroundFileSaver.onStopRequest(aRequest,
                                               aStatusCode);
           } finally {
             // If the data transfer completed successfully, indicate to the
             // 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);
             }
--- a/toolkit/components/downloads/test/unit/head.js
+++ b/toolkit/components/downloads/test/unit/head.js
@@ -332,25 +332,25 @@ function promiseStartExternalHelperAppSe
         uri: sourceURI,
         loadUsingSystemPrincipal: true,
       });
 
       // Start the actual download process.
       channel.asyncOpen({
         contentListener: null,
 
-        onStartRequest(aRequest, aContext) {
+        onStartRequest(aRequest) {
           let requestChannel = aRequest.QueryInterface(Ci.nsIChannel);
           this.contentListener = gExternalHelperAppService.doContent(
                                        requestChannel.contentType, aRequest, null, true);
-          this.contentListener.onStartRequest(aRequest, aContext);
+          this.contentListener.onStartRequest(aRequest);
         },
 
-        onStopRequest(aRequest, aContext, aStatusCode) {
-          this.contentListener.onStopRequest(aRequest, aContext, aStatusCode);
+        onStopRequest(aRequest, aStatusCode) {
+          this.contentListener.onStopRequest(aRequest, aStatusCode);
         },
 
         onDataAvailable(aRequest, aContext, aInputStream, aOffset,
                                   aCount) {
           this.contentListener.onDataAvailable(aRequest, aContext, aInputStream,
                                                aOffset, aCount);
         },
       });
--- a/toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
@@ -28,21 +28,21 @@ function onStopListener(channel) {
                                               Ci.nsIStreamListener]),
       getFinalURI(request) {
         let {loadInfo} = request;
         return (loadInfo && loadInfo.resultPrincipalURI) || request.originalURI;
       },
       onDataAvailable(...args) {
         orig.onDataAvailable(...args);
       },
-      onStartRequest(request, context) {
-        orig.onStartRequest(request, context);
+      onStartRequest(request) {
+        orig.onStartRequest(request);
       },
-      onStopRequest(request, context, statusCode) {
-        orig.onStopRequest(request, context, statusCode);
+      onStopRequest(request, statusCode) {
+        orig.onStopRequest(request, statusCode);
         let URI = this.getFinalURI(request.QueryInterface(Ci.nsIChannel));
         resolve(URI && URI.spec);
       },
     });
   });
 }
 
 async function onModifyListener(originUrl, redirectToUrl) {
--- a/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_suspend.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_suspend.js
@@ -190,17 +190,17 @@ add_task(async function test_set_respons
       loadingPrincipal: ssm.createCodebasePrincipalFromOrigin("http://example.com"),
       contentPolicyType: Ci.nsIContentPolicy.TYPE_XMLHTTPREQUEST,
       securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
     });
 
     channel.asyncOpen({
       QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
-      onStartRequest(request, context) {
+      onStartRequest(request) {
         request.QueryInterface(Ci.nsIHttpChannel);
 
         try {
           resolveHeaderPromise(request.getResponseHeader("foo"));
         } catch (e) {
           resolveHeaderPromise(null);
         }
         request.cancel(Cr.NS_BINDING_ABORTED);
--- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
+++ b/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
@@ -37,33 +37,33 @@ const tests = [
     flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS },
   { contentType: "application/something",
     expectedContentType: "application/something",
     flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS },
 ];
 
 // A basic listener that reads checks the if we sniffed properly.
 var listener = {
-  onStartRequest(request, context) {
+  onStartRequest(request) {
     Assert.equal(request.QueryInterface(Ci.nsIChannel).contentType,
                  tests[testRan].expectedContentType);
   },
 
   onDataAvailable(request, context, 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);
     }
   },
 
-  onStopRequest(request, context, status) {
+  onStopRequest(request, status) {
     testRan++;
     runNext();
   },
 };
 
 function setupChannel(url, flags) {
   let uri = "http://localhost:" +
              httpserver.identity.primaryPort + url;
--- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
+++ b/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
@@ -38,33 +38,33 @@ const tests = [
   // Truncated ff installer regression test for bug 875769.
   { path: "data/ff-inst.exe", expected: "application/octet-stream" },
   // MP4 with invalid box size (0) for "ftyp".
   { path: "data/bug1079747.mp4", expected: "application/octet-stream" },
 ];
 
 // A basic listener that reads checks the if we sniffed properly.
 var listener = {
-  onStartRequest(request, context) {
+  onStartRequest(request) {
     info("Sniffing " + tests[testRan].path);
     Assert.equal(request.QueryInterface(Ci.nsIChannel).contentType, tests[testRan].expected);
   },
 
   onDataAvailable(request, context, 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);
     }
   },
 
-  onStopRequest(request, context, status) {
+  onStopRequest(request, status) {
     testRan++;
     runNext();
   },
 };
 
 function setupChannel(url) {
   var chan = NetUtil.newChannel({
     uri: "http://localhost:" + httpserver.identity.primaryPort + url,
--- a/toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms_streamConverter.js
+++ b/toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms_streamConverter.js
@@ -27,17 +27,17 @@ function registerConverter() {
     convert() {},
 
     // nsIStreamConverter
     asyncConvertData(aFromType, aToType, aListener, aCtxt) {
       this.listener = aListener;
     },
 
     // nsIRequestObserver
-    onStartRequest(aRequest, aContext) {
+    onStartRequest(aRequest) {
       let channel = NetUtil.newChannel({
         uri: "resource://testing-common/form_basic.html",
         loadUsingSystemPrincipal: true,
       });
       channel.originalURI = aRequest.QueryInterface(Ci.nsIChannel).URI;
       channel.loadGroup = aRequest.loadGroup;
       channel.owner = Services.scriptSecurityManager
                               .createCodebasePrincipal(channel.URI, {});
--- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html
@@ -69,20 +69,20 @@ function initLogins(pi) {
   pwmgr.addLogin(proxyLogin);
 }
 
 var startupCompleteResolver;
 var startupComplete = new Promise(resolve => startupCompleteResolver = resolve);
 
 function proxyChannelListener() { }
 proxyChannelListener.prototype = {
-  onStartRequest(request, context) {
+  onStartRequest(request) {
     startupCompleteResolver();
   },
-  onStopRequest(request, context, status) { },
+  onStopRequest(request, status) { },
 };
 
 var resolveCallback = SpecialPowers.wrapCallbackObject({
   QueryInterface(iid) {
     const interfaces = [Ci.nsIProtocolProxyCallback, Ci.nsISupports];
 
     if (!interfaces.some(function(v) {
       return iid.equals(v);
--- a/toolkit/components/places/PageIconProtocolHandler.jsm
+++ b/toolkit/components/places/PageIconProtocolHandler.jsm
@@ -20,18 +20,18 @@ function makeDefaultFaviconChannel(uri, 
 
 function streamDefaultFavicon(uri, loadInfo, outputStream, originalChannel) {
   try {
     // Open up a new channel to get that data, and push it to our output stream.
     // Create a listener to hand data to the pipe's output stream.
     let listener = Cc["@mozilla.org/network/simple-stream-listener;1"]
                      .createInstance(Ci.nsISimpleStreamListener);
     listener.init(outputStream, {
-      onStartRequest(request, context) {},
-      onStopRequest(request, context, statusCode) {
+      onStartRequest(request) {},
+      onStopRequest(request, statusCode) {
         // We must close the outputStream regardless.
         outputStream.close();
       },
     });
     originalChannel.contentType = PlacesUtils.favicons.defaultFaviconMimeType;
     let defaultIconChannel = makeDefaultFaviconChannel(uri, loadInfo);
     defaultIconChannel.asyncOpen(listener);
   } catch (ex) {
--- a/toolkit/components/search/SearchService.jsm
+++ b/toolkit/components/search/SearchService.jsm
@@ -257,23 +257,23 @@ loadListener.prototype = {
     Ci.nsIRequestObserver,
     Ci.nsIStreamListener,
     Ci.nsIChannelEventSink,
     Ci.nsIInterfaceRequestor,
     Ci.nsIProgressEventSink,
   ]),
 
   // nsIRequestObserver
-  onStartRequest: function SRCH_loadStartR(aRequest, aContext) {
+  onStartRequest: function SRCH_loadStartR(aRequest) {
     LOG("loadListener: Starting request: " + aRequest.name);
     this._stream = Cc["@mozilla.org/binaryinputstream;1"].
                    createInstance(Ci.nsIBinaryInputStream);
   },
 
-  onStopRequest: function SRCH_loadStopR(aRequest, aContext, aStatusCode) {
+  onStopRequest: function SRCH_loadStopR(aRequest, aStatusCode) {
     LOG("loadListener: Stopping request: " + aRequest.name);
 
     var requestFailed = !Components.isSuccessCode(aStatusCode);
     if (!requestFailed && (aRequest instanceof Ci.nsIHttpChannel))
       requestFailed = !aRequest.requestSucceeded;
 
     if (requestFailed || this._countRead == 0) {
       LOG("loadListener: request failed!");
--- a/toolkit/components/url-classifier/UrlClassifierHashCompleter.jsm
+++ b/toolkit/components/url-classifier/UrlClassifierHashCompleter.jsm
@@ -756,29 +756,29 @@ HashCompleterRequest.prototype = {
   onDataAvailable: function HCR_onDataAvailable(aRequest, aContext,
                                                 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, aContext) {
+  onStartRequest: function HCR_onStartRequest(aRequest) {
     // At this point no data is available for us and we have no reason to
     // terminate the connection, so we do nothing until |onStopRequest|.
     this._completer._nextGethashTimeMs[this.gethashUrl] = 0;
 
     if (this.telemetryClockStart > 0) {
       let msecs = Date.now() - this.telemetryClockStart;
       Services.telemetry.getKeyedHistogramById("URLCLASSIFIER_COMPLETE_SERVER_RESPONSE_TIME").
         add(this.telemetryProvider, msecs);
     }
   },
 
-  onStopRequest: function HCR_onStopRequest(aRequest, aContext, aStatusCode) {
+  onStopRequest: function HCR_onStopRequest(aRequest, aStatusCode) {
     Services.obs.removeObserver(this, "quit-application");
 
     if (this.timer_) {
       this.timer_.cancel();
       this.timer_ = null;
     }
 
     this.telemetryClockStart = 0;
--- a/toolkit/components/utils/SimpleServices.jsm
+++ b/toolkit/components/utils/SimpleServices.jsm
@@ -84,40 +84,40 @@ AddonLocalizationConverter.prototype = {
   },
 
   asyncConvertData(aFromType, aToType, aListener, aContext) {
     this.checkTypes(aFromType, aToType);
     this.addon = this.getAddon(aContext);
     this.listener = aListener;
   },
 
-  onStartRequest(aRequest, aContext) {
+  onStartRequest(aRequest) {
     this.parts = [];
     this.decoder = new TextDecoder();
   },
 
   onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) {
     let bytes = NetUtil.readInputStream(aInputStream, aCount);
     this.parts.push(this.decoder.decode(bytes, {stream: true}));
   },
 
-  onStopRequest(aRequest, aContext, aStatusCode) {
+  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());
       }
     } catch (e) {
       aStatusCode = e.result || Cr.NS_ERROR_FAILURE;
     }
-    this.listener.onStopRequest(aRequest, null, aStatusCode);
+    this.listener.onStopRequest(aRequest, aStatusCode);
   },
 };
 
 function HttpIndexViewer() {
 }
 
 HttpIndexViewer.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsIDocumentLoaderFactory]),
--- a/toolkit/content/contentAreaUtils.js
+++ b/toolkit/content/contentAreaUtils.js
@@ -1185,20 +1185,20 @@ function openURL(aURL) {
       return;
     }
 
     var loadgroup = Cc["@mozilla.org/network/load-group;1"]
                       .createInstance(Ci.nsILoadGroup);
     var appstartup = Services.startup;
 
     var loadListener = {
-      onStartRequest: function ll_start(aRequest, aContext) {
+      onStartRequest: function ll_start(aRequest) {
         appstartup.enterLastWindowClosingSurvivalArea();
       },
-      onStopRequest: function ll_stop(aRequest, aContext, aStatusCode) {
+      onStopRequest: function ll_stop(aRequest, aStatusCode) {
         appstartup.exitLastWindowClosingSurvivalArea();
       },
       QueryInterface: ChromeUtils.generateQI(["nsIRequestObserver",
                                               "nsISupportsWeakReference"]),
     };
     loadgroup.groupObserver = loadListener;
 
     var uriListener = {
--- a/toolkit/modules/secondscreen/RokuApp.jsm
+++ b/toolkit/modules/secondscreen/RokuApp.jsm
@@ -153,17 +153,17 @@ function RemoteMedia(url, listener) {
 
   this._inputStream = this._socket.openInputStream(0, 0, 0);
   this._pump = Cc["@mozilla.org/network/input-stream-pump;1"].createInstance(Ci.nsIInputStreamPump);
   this._pump.init(this._inputStream, 0, 0, true);
   this._pump.asyncRead(this, null);
 }
 
 RemoteMedia.prototype = {
-  onStartRequest(request, context) {
+  onStartRequest(request) {
   },
 
   onDataAvailable(request, context, stream, offset, count) {
     this._scriptableStream.init(stream);
     let data = this._scriptableStream.read(count);
     if (!data) {
       return;
     }
@@ -182,17 +182,17 @@ RemoteMedia.prototype = {
       }
 
       if ("onRemoteMediaStatus" in this._listener) {
         this._listener.onRemoteMediaStatus(this);
       }
     }
   },
 
-  onStopRequest(request, context, result) {
+  onStopRequest(request, result) {
     if (this._listener && "onRemoteMediaStop" in this._listener)
       this._listener.onRemoteMediaStop(this);
   },
 
   _sendMsg: function _sendMsg(data) {
     if (!data)
       return;
 
--- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
@@ -1995,17 +1995,17 @@ var DownloadAddonInstall = class extends
     this.channel = aNewChannel;
   }
 
   /*
    * This is the first chance to get at real headers on the channel.
    *
    * @see nsIStreamListener
    */
-  onStartRequest(aRequest, aContext) {
+  onStartRequest(aRequest) {
     if (this.hash) {
       try {
         this.crypto = CryptoHash(this.hash.algorithm);
       } catch (e) {
         logger.warn("Unknown hash algorithm '" + this.hash.algorithm + "' for addon " + this.sourceURI.spec, e);
         this.state = AddonManager.STATE_DOWNLOAD_FAILED;
         this.error = AddonManager.ERROR_INCORRECT_HASH;
         XPIInstall.installs.delete(this);
@@ -2030,17 +2030,17 @@ var DownloadAddonInstall = class extends
     }
   }
 
   /*
    * The download is complete.
    *
    * @see nsIStreamListener
    */
-  onStopRequest(aRequest, aContext, aStatus) {
+  onStopRequest(aRequest, aStatus) {
     this.stream.close();
     this.channel = null;
     this.badCerthandler = null;
     Services.obs.removeObserver(this, "network:offline-about-to-go-offline");
 
     // If the download was cancelled then update the state and send events
     if (aStatus == Cr.NS_BINDING_ABORTED) {
       if (this.state == AddonManager.STATE_DOWNLOADING) {
--- a/toolkit/mozapps/update/UpdateService.jsm
+++ b/toolkit/mozapps/update/UpdateService.jsm
@@ -3680,34 +3680,32 @@ Downloader.prototype = {
       }
     }
   },
 
   /**
    * When the async request begins
    * @param   request
    *          The nsIRequest object for the transfer
-   * @param   context
-   *          Additional data
    */
-  onStartRequest: function Downloader_onStartRequest(request, context) {
+  onStartRequest: function Downloader_onStartRequest(request) {
     if (request instanceof Ci.nsIIncrementalDownload)
       LOG("Downloader:onStartRequest - original URI spec: " + request.URI.spec +
           ", final URI spec: " + request.finalURI.spec);
     // Set finalURL in onStartRequest if it is different.
     if (this._patch.finalURL != request.finalURI.spec) {
       this._patch.finalURL = request.finalURI.spec;
       Cc["@mozilla.org/updates/update-manager;1"].
         getService(Ci.nsIUpdateManager).saveUpdates();
     }
 
     let listeners = this._listeners.concat();
     let listenerCount = listeners.length;
     for (let i = 0; i < listenerCount; ++i) {
-      listeners[i].onStartRequest(request, context);
+      listeners[i].onStartRequest(request);
     }
   },
 
   /**
    * When new data has been downloaded
    * @param   request
    *          The nsIRequest object for the transfer
    * @param   context
@@ -3773,23 +3771,21 @@ Downloader.prototype = {
         listener.onStatus(request, context, status, statusText);
     }
   },
 
   /**
    * When data transfer ceases
    * @param   request
    *          The nsIRequest object for the transfer
-   * @param   context
-   *          Additional data
    * @param   status
    *          Status code containing the reason for the cessation.
    */
    /* eslint-disable-next-line complexity */
-  onStopRequest: function Downloader_onStopRequest(request, context, status) {
+  onStopRequest: function Downloader_onStopRequest(request, status) {
     if (request instanceof Ci.nsIIncrementalDownload)
       LOG("Downloader:onStopRequest - original URI spec: " + request.URI.spec +
           ", final URI spec: " + request.finalURI.spec + ", status: " + status);
 
     // XXX ehsan shouldShowPrompt should always be false here.
     // But what happens when there is already a UI showing?
     var state = this._patch.state;
     var shouldShowPrompt = false;
@@ -3934,17 +3930,17 @@ Downloader.prototype = {
     }
 
     // Only notify listeners about the stopped state if we
     // aren't handling an internal retry.
     if (!shouldRetrySoon && !shouldRegisterOnlineObserver) {
       var listeners = this._listeners.concat();
       var listenerCount = listeners.length;
       for (var i = 0; i < listenerCount; ++i) {
-        listeners[i].onStopRequest(request, context, status);
+        listeners[i].onStopRequest(request, status);
       }
     }
 
     this._request = null;
 
     if (state == STATE_DOWNLOAD_FAILED) {
       var allFailed = true;
       // Check if there is a complete update patch that can be downloaded.
--- a/toolkit/mozapps/update/content/updates.js
+++ b/toolkit/mozapps/update/content/updates.js
@@ -936,17 +936,17 @@ var gDownloadingPage = {
 
   /**
    * When the data transfer begins
    * @param   request
    *          The nsIRequest object for the transfer
    * @param   context
    *          Additional data
    */
-  onStartRequest(request, context) {
+  onStartRequest(request) {
     // This !paused test is necessary because onStartRequest may fire after
     // the download was paused (for those speedy clickers...)
     if (this._paused)
       return;
 
     this._downloadProgress.removeAttribute("value");
     this._setStatus(this._label_downloadStatus);
   },
@@ -1012,17 +1012,17 @@ var gDownloadingPage = {
    * When data transfer ceases
    * @param   request
    *          The nsIRequest object for the transfer
    * @param   context
    *          Additional data
    * @param   status
    *          Status code containing the reason for the cessation.
    */
-  onStopRequest(request, context, status) {
+  onStopRequest(request, status) {
     this._downloadProgress.setAttribute("value", "100");
 
     var u = gUpdates.update;
     switch (status) {
       case Cr.NS_ERROR_CORRUPTED_CONTENT:
       case Cr.NS_ERROR_UNEXPECTED:
         if (u.selectedPatch.state == STATE_DOWNLOAD_FAILED &&
             (u.isCompleteUpdate || u.patchCount != 2)) {
--- a/toolkit/mozapps/update/tests/chrome/test_0085_error_patchApplyFailure_partial_complete_staging.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0085_error_patchApplyFailure_partial_complete_staging.xul
@@ -20,23 +20,23 @@
 <![CDATA[
 
 // This test forces the download to complete before the "next" button on the
 // errorpatching wizard page is clicked. This is done by creating the continue
 // file when the wizard loads to start the download, then clicking the "next"
 // button in the download's onStopRequest event listener.
 
 const testDownloadListener = {
-  onStartRequest(aRequest, aContext) { },
+  onStartRequest(aRequest) { },
 
   onProgress(aRequest, aContext, aProgress, aMaxProgress) { },
 
   onStatus(aRequest, aContext, aStatus, aStatusText) { },
 
-  onStopRequest(aRequest, aContext, aStatus) {
+  onStopRequest(aRequest, aStatus) {
     debugDump("clicking errorpatching page next button");
     gDocElem.getButton("next").click();
     gAUS.removeDownloadListener(this);
   },
 
   QueryInterface: ChromeUtils.generateQI([Ci.nsIRequestObserver,
                                           Ci.nsIProgressEventSink])
 };
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ -3498,27 +3498,27 @@ function waitForUpdateCheck(aSuccess, aE
  */
 function waitForUpdateDownload(aUpdates, aUpdateCount, aExpectedStatus) {
   let bestUpdate = gAUS.selectUpdate(aUpdates, aUpdateCount);
   let state = gAUS.downloadUpdate(bestUpdate, false);
   if (state == STATE_NONE || state == STATE_FAILED) {
     do_throw("nsIApplicationUpdateService:downloadUpdate returned " + state);
   }
   return new Promise(resolve => gAUS.addDownloadListener({
-    onStartRequest: (aRequest, aContext) => {
+    onStartRequest: (aRequest) => {
     },
     onProgress: (aRequest, aContext, aProgress, aMaxProgress) => {
     },
     onStatus: (aRequest, aContext, aStatus, aStatusText) => {
     },
-    onStopRequest: (request, context, status) => {
+    onStopRequest: (request, status) => {
       gAUS.removeDownloadListener(this);
       Assert.equal(aExpectedStatus, status,
                    "the download status" + MSG_SHOULD_EQUAL);
-      resolve(request, context, status);
+      resolve(request, status);
     },
     QueryInterface: ChromeUtils.generateQI([Ci.nsIRequestObserver,
                                             Ci.nsIProgressEventSink]),
   }));
 }
 
 /**
  * Helper for starting the http server used by the tests
@@ -3888,17 +3888,17 @@ IncrementalDownload.prototype = {
   },
 
   start(observer, ctxt) {
     // Do the actual operation async to give a chance for observers to add
     // themselves.
     Services.tm.dispatchToMainThread(() => {
       this._observer = observer.QueryInterface(Ci.nsIRequestObserver);
       this._ctxt = ctxt;
-      this._observer.onStartRequest(this, this._ctxt);
+      this._observer.onStartRequest(this);
       let mar = getTestDirFile(FILE_SIMPLE_MAR);
       mar.copyTo(this._destination.parent, this._destination.leafName);
       let status = Cr.NS_OK;
       switch (gIncrementalDownloadErrorType++) {
         case 0:
           status = Cr.NS_ERROR_NET_RESET;
           break;
         case 1:
@@ -3916,17 +3916,17 @@ IncrementalDownload.prototype = {
           // status being changed to online.
           Services.tm.dispatchToMainThread(function() {
             Services.obs.notifyObservers(gAUS,
                                          "network:offline-status-changed",
                                          "online");
           });
           break;
       }
-      this._observer.onStopRequest(this, this._ctxt, status);
+      this._observer.onStopRequest(this, status);
     });
   },
 
   get URI() {
     return this._URI;
   },
 
   get currentSize() {