Backed out changeset e1f3ed984607 (bug 1261585) for causing bug 1292586 a=backout
authorWes Kocher <wkocher@mozilla.com>
Mon, 22 Aug 2016 11:29:04 -0700
changeset 354075 3345f0e8ed3bd33d8af6e2b9bf1fd8bf397a45bc
parent 354074 63988dbb25327ff93dd6e0c7e07b2b819795a9eb
child 354076 24763f58772d45279a935790f732d80851924b46
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1261585, 1292586
milestone51.0a1
backs oute1f3ed984607e209ab9ba3a4892b58d3d03b9430
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
Backed out changeset e1f3ed984607 (bug 1261585) for causing bug 1292586 a=backout
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/HttpBaseChannel.h
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/HttpChannelChild.h
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/PHttpChannel.ipdl
netwerk/test/unit_ipc/child_tracable_listener.js
netwerk/test/unit_ipc/test_traceable_channel_decoded_data.js
netwerk/test/unit_ipc/test_traceable_channel_modify_response.js
netwerk/test/unit_ipc/xpcshell.ini
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -64,17 +64,16 @@ HttpBaseChannel::HttpBaseChannel()
   : mStartPos(UINT64_MAX)
   , mStatus(NS_OK)
   , mLoadFlags(LOAD_NORMAL)
   , mCaps(0)
   , mClassOfService(0)
   , mPriority(PRIORITY_NORMAL)
   , mRedirectionLimit(gHttpHandler->RedirectionLimit())
   , mApplyConversion(true)
-  , mHaveListenerForTraceableChannel(false)
   , mCanceled(false)
   , mIsPending(false)
   , mWasOpened(false)
   , mRequestObserversCalled(false)
   , mResponseHeadersModified(false)
   , mAllowPipelining(true)
   , mAllowSTS(true)
   , mThirdPartyFlags(0)
@@ -2657,17 +2656,16 @@ HttpBaseChannel::SetNewListener(nsIStrea
     return NS_ERROR_FAILURE;
 
   NS_ENSURE_ARG_POINTER(aListener);
 
   nsCOMPtr<nsIStreamListener> wrapper = new nsStreamListenerWrapper(mListener);
 
   wrapper.forget(_retval);
   mListener = aListener;
-  mHaveListenerForTraceableChannel = true;
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // HttpBaseChannel helpers
 //-----------------------------------------------------------------------------
 
 void
--- a/netwerk/protocol/http/HttpBaseChannel.h
+++ b/netwerk/protocol/http/HttpBaseChannel.h
@@ -309,18 +309,16 @@ public: /* Necko internal use only... */
     // mListenerContext.
     nsresult DoApplyContentConversions(nsIStreamListener *aNextListener,
                                        nsIStreamListener **aNewNextListener);
 
     // Callback on main thread when NS_AsyncCopy() is finished populating
     // the new mUploadStream.
     void EnsureUploadStreamIsCloneableComplete(nsresult aStatus);
 
-    bool HaveListenerForTraceableChannel() { return mHaveListenerForTraceableChannel; }
-
 protected:
   nsCOMArray<nsISecurityConsoleMessage> mSecurityConsoleMessages;
 
   // Handle notifying listener, removing from loadgroup if request failed.
   void     DoNotifyListener();
   virtual void DoNotifyListenerCleanup() = 0;
 
   // drop reference to listener, its callbacks, and the progress sink
@@ -412,40 +410,39 @@ protected:
 
   nsresult                          mStatus;
   uint32_t                          mLoadFlags;
   uint32_t                          mCaps;
   uint32_t                          mClassOfService;
   int16_t                           mPriority;
   uint8_t                           mRedirectionLimit;
 
-  uint32_t                          mApplyConversion                 : 1;
-  uint32_t                          mHaveListenerForTraceableChannel : 1;
-  uint32_t                          mCanceled                        : 1;
-  uint32_t                          mIsPending                       : 1;
-  uint32_t                          mWasOpened                       : 1;
+  uint32_t                          mApplyConversion            : 1;
+  uint32_t                          mCanceled                   : 1;
+  uint32_t                          mIsPending                  : 1;
+  uint32_t                          mWasOpened                  : 1;
   // if 1 all "http-on-{opening|modify|etc}-request" observers have been called
-  uint32_t                          mRequestObserversCalled          : 1;
-  uint32_t                          mResponseHeadersModified         : 1;
-  uint32_t                          mAllowPipelining                 : 1;
-  uint32_t                          mAllowSTS                        : 1;
-  uint32_t                          mThirdPartyFlags                 : 3;
-  uint32_t                          mUploadStreamHasHeaders          : 1;
-  uint32_t                          mInheritApplicationCache         : 1;
-  uint32_t                          mChooseApplicationCache          : 1;
-  uint32_t                          mLoadedFromApplicationCache      : 1;
-  uint32_t                          mChannelIsForDownload            : 1;
-  uint32_t                          mTracingEnabled                  : 1;
+  uint32_t                          mRequestObserversCalled     : 1;
+  uint32_t                          mResponseHeadersModified    : 1;
+  uint32_t                          mAllowPipelining            : 1;
+  uint32_t                          mAllowSTS                   : 1;
+  uint32_t                          mThirdPartyFlags            : 3;
+  uint32_t                          mUploadStreamHasHeaders     : 1;
+  uint32_t                          mInheritApplicationCache    : 1;
+  uint32_t                          mChooseApplicationCache     : 1;
+  uint32_t                          mLoadedFromApplicationCache : 1;
+  uint32_t                          mChannelIsForDownload       : 1;
+  uint32_t                          mTracingEnabled             : 1;
   // True if timing collection is enabled
-  uint32_t                          mTimingEnabled                   : 1;
-  uint32_t                          mAllowSpdy                       : 1;
-  uint32_t                          mAllowAltSvc                     : 1;
-  uint32_t                          mResponseTimeoutEnabled          : 1;
+  uint32_t                          mTimingEnabled              : 1;
+  uint32_t                          mAllowSpdy                  : 1;
+  uint32_t                          mAllowAltSvc                : 1;
+  uint32_t                          mResponseTimeoutEnabled     : 1;
   // A flag that should be false only if a cross-domain redirect occurred
-  uint32_t                          mAllRedirectsSameOrigin          : 1;
+  uint32_t                          mAllRedirectsSameOrigin     : 1;
 
   // Is 1 if no redirects have occured or if all redirects
   // pass the Resource Timing timing-allow-check
   uint32_t                          mAllRedirectsPassTimingAllowCheck : 1;
 
   // True if this channel was intercepted and could receive a synthesized response.
   uint32_t                          mResponseCouldBeSynthesized : 1;
 
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -363,34 +363,29 @@ HttpChannelChild::RecvOnStartRequest(con
                                      const bool& isFromCache,
                                      const bool& cacheEntryAvailable,
                                      const uint32_t& cacheExpirationTime,
                                      const nsCString& cachedCharset,
                                      const nsCString& securityInfoSerialization,
                                      const NetAddr& selfAddr,
                                      const NetAddr& peerAddr,
                                      const int16_t& redirectCount,
-                                     const uint32_t& cacheKey,
-                                     const bool& contentDecodingWillBeCalledOnParent)
+                                     const uint32_t& cacheKey)
 {
   LOG(("HttpChannelChild::RecvOnStartRequest [this=%p]\n", this));
   // mFlushedForDiversion and mDivertingToParent should NEVER be set at this
   // stage, as they are set in the listener's OnStartRequest.
   MOZ_RELEASE_ASSERT(!mFlushedForDiversion,
     "mFlushedForDiversion should be unset before OnStartRequest!");
   MOZ_RELEASE_ASSERT(!mDivertingToParent,
     "mDivertingToParent should be unset before OnStartRequest!");
 
 
   mRedirectCount = redirectCount;
 
-  if (contentDecodingWillBeCalledOnParent) {
-    SetApplyConversion(false);
-  }
-
   mEventQ->RunOrEnqueue(new StartRequestEvent(this, channelStatus, responseHead,
                                               useResponseHead, requestHeaders,
                                               isFromCache, cacheEntryAvailable,
                                               cacheExpirationTime,
                                               cachedCharset,
                                               securityInfoSerialization,
                                               selfAddr, peerAddr, cacheKey));
   return true;
--- a/netwerk/protocol/http/HttpChannelChild.h
+++ b/netwerk/protocol/http/HttpChannelChild.h
@@ -116,18 +116,17 @@ protected:
                           const bool& isFromCache,
                           const bool& cacheEntryAvailable,
                           const uint32_t& cacheExpirationTime,
                           const nsCString& cachedCharset,
                           const nsCString& securityInfoSerialization,
                           const NetAddr& selfAddr,
                           const NetAddr& peerAddr,
                           const int16_t& redirectCount,
-                          const uint32_t& cacheKey,
-                          const bool& contentDecodingWillBeCalledOnParent) override;
+                          const uint32_t& cacheKey) override;
   bool RecvOnTransportAndData(const nsresult& channelStatus,
                               const nsresult& status,
                               const uint64_t& progress,
                               const uint64_t& progressMax,
                               const uint64_t& offset,
                               const uint32_t& count,
                               const nsCString& data) override;
   bool RecvOnStopRequest(const nsresult& statusCode, const ResourceTimingStruct& timing) override;
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -34,17 +34,16 @@
 #include "mozilla/LoadInfo.h"
 #include "nsQueryObject.h"
 #include "mozilla/BasePrincipal.h"
 #include "nsCORSListenerProxy.h"
 #include "nsIPrompt.h"
 #include "nsIWindowWatcher.h"
 #include "nsIDocument.h"
 #include "nsStringStream.h"
-#include "nsIExternalHelperAppService.h"
 
 using mozilla::BasePrincipal;
 using namespace mozilla::dom;
 using namespace mozilla::ipc;
 
 namespace mozilla {
 namespace net {
 
@@ -1025,57 +1024,18 @@ HttpChannelParent::OnStartRequest(nsIReq
     if (mIPCClosed ||
         !SendAssociateApplicationCache(appCacheGroupId, appCacheClientId))
     {
       return NS_ERROR_UNEXPECTED;
     }
   }
 
   nsCOMPtr<nsIEncodedChannel> encodedChannel = do_QueryInterface(aRequest);
-  if (encodedChannel) {
-    if (!mChannel->HaveListenerForTraceableChannel()) {
-      encodedChannel->SetApplyConversion(false);
-    } else {
-      // We have a traceableChannel listener so we need to do a conversion on
-      // the parent. But first we need to check with
-      // external-helper-app-service, e.g. we do not ungzip if url has a gz
-      // extention.
-      // This code is a copy of
-      // nsExternalAppHandler::MaybeApplyDecodingForExtension and should be
-      // kept in sync with it.
-      nsCOMPtr<nsIURI> uri;
-      chan->GetURI(getter_AddRefs(uri));
-      nsCOMPtr<nsIURL> url(do_QueryInterface(uri));
-      if (url) {
-        nsAutoCString extension;
-        url->GetFileExtension(extension);
-        if (!extension.IsEmpty()) {
-          nsCOMPtr<nsIUTF8StringEnumerator> encEnum;
-          encodedChannel->GetContentEncodings(getter_AddRefs(encEnum));
-          if (encEnum) {
-            bool hasMore;
-            nsresult rv = encEnum->HasMore(&hasMore);
-            if (NS_SUCCEEDED(rv) && hasMore) {
-              nsAutoCString encType;
-              rv = encEnum->GetNext(encType);
-              if (NS_SUCCEEDED(rv) && !encType.IsEmpty()) {
-                nsCOMPtr<nsIExternalHelperAppService> helperAppService =
-                  do_GetService("@mozilla.org/uriloader/external-helper-app-service;1");
-                MOZ_ASSERT(helperAppService);
-                bool applyConversion;
-                helperAppService->ApplyDecodingForExtension(extension, encType,
-                                                            &applyConversion);
-                encodedChannel->SetApplyConversion(applyConversion);
-              }
-            }
-          }
-        }
-      }
-    }
-  }
+  if (encodedChannel)
+    encodedChannel->SetApplyConversion(false);
 
   // Keep the cache entry for future use in RecvSetCacheTokenCachedCharset().
   // It could be already released by nsHttpChannel at that time.
   nsCOMPtr<nsISupports> cacheEntry;
   chan->GetCacheToken(getter_AddRefs(cacheEntry));
   mCacheEntry = do_QueryInterface(cacheEntry);
 
   nsresult channelStatus = NS_OK;
@@ -1110,18 +1070,17 @@ HttpChannelParent::OnStartRequest(nsIReq
                           responseHead ? *responseHead : nsHttpResponseHead(),
                           !!responseHead,
                           requestHead->Headers(),
                           isFromCache,
                           mCacheEntry ? true : false,
                           expirationTime, cachedCharset, secInfoSerialization,
                           mChannel->GetSelfAddr(), mChannel->GetPeerAddr(),
                           redirectCount,
-                          cacheKeyValue,
-                          mChannel->HaveListenerForTraceableChannel()))
+                          cacheKeyValue))
   {
     rv = NS_ERROR_UNEXPECTED;
   }
   requestHead->Exit();
   return rv;
 }
 
 NS_IMETHODIMP
@@ -1526,24 +1485,21 @@ HttpChannelParent::StartDiversion()
     }
   }
   mDivertedOnStartRequest = true;
 
   // After OnStartRequest has been called, setup content decoders if needed.
   //
   // Create a content conversion chain based on mDivertListener and update
   // mDivertListener.
-  // If nsITraceableChannel is added the conversion will be already done.
-  if (!mChannel->HaveListenerForTraceableChannel()) {
-    nsCOMPtr<nsIStreamListener> converterListener;
-    mChannel->DoApplyContentConversions(mDivertListener,
-                                        getter_AddRefs(converterListener));
-    if (converterListener) {
-      mDivertListener = converterListener.forget();
-    }
+  nsCOMPtr<nsIStreamListener> converterListener;
+  mChannel->DoApplyContentConversions(mDivertListener,
+                                      getter_AddRefs(converterListener));
+  if (converterListener) {
+    mDivertListener = converterListener.forget();
   }
 
   // Now mParentListener can be diverted to mDivertListener.
   DebugOnly<nsresult> rvdbg = mParentListener->DivertTo(mDivertListener);
   MOZ_ASSERT(NS_SUCCEEDED(rvdbg));
   mDivertListener = nullptr;
 
   if (NS_WARN_IF(mIPCClosed || !SendFlushedForDiversion())) {
--- a/netwerk/protocol/http/PHttpChannel.ipdl
+++ b/netwerk/protocol/http/PHttpChannel.ipdl
@@ -94,18 +94,17 @@ child:
                        bool                isFromCache,
                        bool                cacheEntryAvailable,
                        uint32_t            cacheExpirationTime,
                        nsCString           cachedCharset,
                        nsCString           securityInfoSerialization,
                        NetAddr             selfAddr,
                        NetAddr             peerAddr,
                        int16_t             redirectCount,
-                       uint32_t            cacheKey,
-                       bool                contentDecodingWillBeCalledOnParent);
+                       uint32_t            cacheKey);
 
   // Combines a single OnDataAvailable and its associated OnProgress &
   // OnStatus calls into one IPDL message
   async OnTransportAndData(nsresult  channelStatus,
                            nsresult  transportStatus,
                            uint64_t  progress,
                            uint64_t  progressMax,
                            uint64_t  offset,
deleted file mode 100644
--- a/netwerk/test/unit_ipc/child_tracable_listener.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Send HTTP requests and check if the received content is correct.
- */
-
-Cu.import("resource://gre/modules/NetUtil.jsm");
-
-let shouldQuit = false;
-
-function run_test() {
-  // keep the event loop busy and the test alive until a "finish" command
-  // is issued by parent
-  do_timeout(100, function keepAlive() {
-    if (!shouldQuit) {
-      do_timeout(100, keepAlive);
-    }
-  });
-}
-
-var expectedResponse;
-
-function makeRequest(uri, response) {
-  let requestChannel = NetUtil.newChannel({uri, loadUsingSystemPrincipal: true});
-
-  expectedResponse = response;
-  requestChannel.asyncOpen2(new ChannelListener(checkResponse, null, CL_EXPECT_GZIP));
-}
-
-function checkResponse(request, buffer) {
-  do_check_eq(expectedResponse, buffer);
-
-  do_send_remote_message(`response`);
-}
-
-function finish() {
-  shouldQuit = true;
-}
deleted file mode 100644
--- a/netwerk/test/unit_ipc/test_traceable_channel_decoded_data.js
+++ /dev/null
@@ -1,172 +0,0 @@
-// Test nsITraceableChannel interface.
-//
-// The test checks that content-encoded responses are received decoded by a
-// tracing listener.
-
-Cu.import("resource://testing-common/httpd.js");
-Cu.import("resource://gre/modules/NetUtil.jsm");
-
-const DEBUG = false;
-
-function debug(msg) {
-  if (DEBUG) {
-    dump(msg);
-  }
-}
-
-var httpserver = new HttpServer();
-httpserver.start(-1);
-const PORT = httpserver.identity.primaryPort;
-
-var originalBody = "original http response body";
-
-var body = [
-  0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xcb, 0x2f, 0xca, 0x4c, 0xcf, 0xcc,
-  0x4b, 0xcc, 0x51, 0xc8, 0x28, 0x29, 0x29, 0x50, 0x28, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e,
-  0x55, 0x48, 0xca, 0x4f, 0xa9, 0x04, 0x00, 0x94, 0xde, 0x94, 0x9c, 0x1b, 0x00, 0x00, 0x00];
-
-var observer;
-
-function TracingListener() {}
-
-TracingListener.prototype = {
-  gotOnStartRequest: false,
-  pipe: null,
-  streamSink: null,
-  listener: null,
-
-  // Replace received response body.
-  onDataAvailable: function(request, context, inputStream,
-                           offset, count) {
-    debug("*** tracing listener onDataAvailable\n");
-  },
-
-  onStartRequest: function(request, context) {
-    debug("*** tracing listener onStartRequest\n");
-
-    this.gotOnStartRequest = true;
-
-    request.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
-
-    do_check_eq(request.localAddress, "127.0.0.1");
-    do_check_eq(request.localPort > 0, true);
-    do_check_neq(request.localPort, PORT);
-    do_check_eq(request.remoteAddress, "127.0.0.1");
-    do_check_eq(request.remotePort, PORT);
-  },
-
-  onStopRequest: function(request, context, statusCode) {
-    debug("*** tracing listener onStopRequest\n");
-
-    var sin = Components.classes["@mozilla.org/scriptableinputstream;1"].
-                createInstance(Ci.nsIScriptableInputStream);
-
-    this.streamSink.close();
-    var input = this.pipe.inputStream;
-    sin.init(input);
-    do_check_eq(sin.available(), originalBody.length);
-
-    var result = sin.read(originalBody.length);
-    do_check_eq(result, originalBody);
-
-    input.close();
-
-    do_check_eq(this.gotOnStartRequest, true);
-
-    let message = `response`;
-    do_await_remote_message(message).then(() => {
-      sendCommand("finish();", stopServer);
-    });
-  },
-
-  QueryInterface: function(iid) {
-    if (iid.equals(Components.interfaces.nsIStreamListener) ||
-        iid.equals(Components.interfaces.nsIRequestObserver) ||
-        iid.equals(Components.interfaces.nsISupports)
-        )
-      return this;
-    throw Components.results.NS_NOINTERFACE;
-  }
-}
-
-function HttpResponseExaminer() {}
-
-HttpResponseExaminer.prototype = {
-  register: function() {
-    Cc["@mozilla.org/observer-service;1"].
-      getService(Components.interfaces.nsIObserverService).
-      addObserver(this, "http-on-examine-response", true);
-    debug("Did HttpResponseExaminer.register\n");
-  },
-
-  unregister: function() {
-    Cc["@mozilla.org/observer-service;1"].
-      getService(Components.interfaces.nsIObserverService).
-      removeObserver(this, "http-on-examine-response", true);
-    debug("Did HttpResponseExaminer.unregister\n");
-  },
-
-  // Replace channel's listener.
-  observe: function(subject, topic, data) {
-    debug("In HttpResponseExaminer.observe\n");
-
-    try {
-      subject.QueryInterface(Components.interfaces.nsITraceableChannel);
-
-      var tee = Cc["@mozilla.org/network/stream-listener-tee;1"].
-          createInstance(Ci.nsIStreamListenerTee);
-      var newListener = new TracingListener();
-      newListener.pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe);
-      newListener.pipe.init(false, false, 0, 0xffffffff, null);
-      newListener.streamSink = newListener.pipe.outputStream;
-
-      var originalListener = subject.setNewListener(tee);
-      tee.init(originalListener, newListener.streamSink, newListener);
-    } catch(e) {
-      do_throw("can't replace listener " + e);
-    }
-
-    debug("Did HttpResponseExaminer.observe\n");
-  },
-
-  QueryInterface: function(iid) {
-    if (iid.equals(Components.interfaces.nsIObserver) ||
-        iid.equals(Components.interfaces.nsISupportsWeakReference) ||
-        iid.equals(Components.interfaces.nsISupports))
-      return this;
-    throw Components.results.NS_NOINTERFACE;
-  }
-}
-
-function test_handlerContentEncoded(metadata, response) {
-  response.setStatusLine(metadata.httpVersion, 200, "OK");
-  response.setHeader("Content-Type", "text/plain", false);
-  response.setHeader("Content-Encoding", "gzip", false);
-  response.setHeader("Content-Length", "" + body.length, false);
-
-  var bos = Components.classes["@mozilla.org/binaryoutputstream;1"]
-    .createInstance(Components.interfaces.nsIBinaryOutputStream);
-  bos.setOutputStream(response.bodyOutputStream);
-
-  response.processAsync();
-  bos.writeByteArray(body, body.length);
-  response.finish();
-}
-
-function test_contentEncoded() {
-  sendCommand(`makeRequest("http://localhost:${PORT}/testContentEncoded", "${originalBody}");`);
-}
-
-function stopServer() {
-  observer.unregister();
-  httpserver.stop(do_test_finished)
-}
-
-function run_test() {
-
-  observer = new HttpResponseExaminer();
-  observer.register();
-
-  httpserver.registerPathHandler("/testContentEncoded", test_handlerContentEncoded);
-  run_test_in_child("child_tracable_listener.js", test_contentEncoded);
-}
deleted file mode 100644
--- a/netwerk/test/unit_ipc/test_traceable_channel_modify_response.js
+++ /dev/null
@@ -1,186 +0,0 @@
-// Test nsITraceableChannel interface.
-//
-// The test checks that a tracing listener can modifies the body of a HTTP
-// response.
-// This test also check that it is not possible to set a tracableLisener after
-// onStartRequest is called.
-
-Cu.import("resource://testing-common/httpd.js");
-Cu.import("resource://gre/modules/NetUtil.jsm");
-
-const DEBUG = false;
-
-function debug(msg) {
-  if (DEBUG) {
-    dump(msg);
-  }
-}
-
-var httpserver = new HttpServer();
-httpserver.start(-1);
-const PORT = httpserver.identity.primaryPort;
-
-var originalBody = "original http response body";
-var replacedBody = "replaced http response body";
-
-var observer;
-
-function TracingListener() {}
-
-TracingListener.prototype = {
-  gotOnStartRequest: false,
-  pipe: null,
-  streamSink: null,
-  listener: null,
-  onDataAvailableCalled: false,
-
-  // Replace received response body.
-  onDataAvailable: function(request, context, inputStream,
-                           offset, count) {
-    debug("*** tracing listener onDataAvailable\n");
-
-    var binaryInputStream = Cc["@mozilla.org/binaryinputstream;1"].
-      createInstance(Components.interfaces.nsIBinaryInputStream);
-    binaryInputStream.setInputStream(inputStream);
-
-    var data = binaryInputStream.readBytes(count);
-    var origBody = originalBody.substr(offset, count);
-
-    do_check_eq(origBody, data);
-
-    if (!this.onDataAvailableCalled) {
-      this.onDataAvailableCalled = true;
-      var storageStream = Cc["@mozilla.org/storagestream;1"].
-        createInstance(Components.interfaces.nsIStorageStream);
-      var binaryOutputStream = Cc["@mozilla.org/binaryoutputstream;1"].
-        createInstance(Components.interfaces.nsIBinaryOutputStream);
-
-      storageStream.init(8192, 100, null);
-      binaryOutputStream.setOutputStream(storageStream.getOutputStream(0));
-
-      var newBody = replacedBody.substr(offset, count);
-      binaryOutputStream.writeBytes(newBody, newBody.length);
-
-      this.listener.onDataAvailable(request, context,
-                                    storageStream.newInputStream(0), 0,
-                                    replacedBody.length);
-    }
-  },
-
-  onStartRequest: function(request, context) {
-    debug("*** tracing listener onStartRequest\n");
-
-    this.listener.onStartRequest(request, context);
-
-    this.gotOnStartRequest = true;
-
-    request.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
-
-    do_check_eq(request.localAddress, "127.0.0.1");
-    do_check_eq(request.localPort > 0, true);
-    do_check_neq(request.localPort, PORT);
-    do_check_eq(request.remoteAddress, "127.0.0.1");
-    do_check_eq(request.remotePort, PORT);
-
-    // Make sure listener can't be replaced after OnStartRequest was called.
-    request.QueryInterface(Components.interfaces.nsITraceableChannel);
-    try {
-      var newListener = new TracingListener();
-      newListener.listener = request.setNewListener(newListener);
-    } catch(e) {
-      do_check_true(true, "TracingListener.onStartRequest swallowing exception: " + e + "\n");
-      return; // OK
-    }
-    do_throw("replaced channel's listener during onStartRequest.");
-  },
-
-  onStopRequest: function(request, context, statusCode) {
-    debug("*** tracing listener onStopRequest\n");
-
-
-    this.listener.onStopRequest(request, context, statusCode)
-
-    do_check_eq(this.gotOnStartRequest, true);
-
-    let message = `response`;
-    do_await_remote_message(message).then(() => {
-      sendCommand("finish();", stopServer);
-    });
-  },
-
-  QueryInterface: function(iid) {
-    if (iid.equals(Components.interfaces.nsIStreamListener) ||
-        iid.equals(Components.interfaces.nsIRequestObserver) ||
-        iid.equals(Components.interfaces.nsISupports)
-        )
-      return this;
-    throw Components.results.NS_NOINTERFACE;
-  }
-}
-
-function HttpResponseExaminer() {}
-
-HttpResponseExaminer.prototype = {
-  register: function() {
-    Cc["@mozilla.org/observer-service;1"].
-      getService(Components.interfaces.nsIObserverService).
-      addObserver(this, "http-on-examine-response", true);
-    debug("Did HttpResponseExaminer.register\n");
-  },
-
-  unregister: function() {
-    Cc["@mozilla.org/observer-service;1"].
-      getService(Components.interfaces.nsIObserverService).
-      removeObserver(this, "http-on-examine-response", true);
-    debug("Did HttpResponseExaminer.unregister\n");
-  },
-
-  // Replace channel's listener.
-  observe: function(subject, topic, data) {
-    debug("In HttpResponseExaminer.observe\n");
-
-    try {
-      subject.QueryInterface(Components.interfaces.nsITraceableChannel);
-      var newListener = new TracingListener();
-      newListener.listener = subject.setNewListener(newListener);
-    } catch(e) {
-      do_throw("can't replace listener " + e);
-    }
-
-    debug("Did HttpResponseExaminer.observe\n");
-  },
-
-  QueryInterface: function(iid) {
-    if (iid.equals(Components.interfaces.nsIObserver) ||
-        iid.equals(Components.interfaces.nsISupportsWeakReference) ||
-        iid.equals(Components.interfaces.nsISupports))
-      return this;
-    throw Components.results.NS_NOINTERFACE;
-  }
-}
-
-function test_handlerSimple(metadata, response) {
-  response.setHeader("Content-Type", "text/html", false);
-  response.setStatusLine(metadata.httpVersion, 200, "OK");
-  response.bodyOutputStream.write(originalBody, originalBody.length);
-}
-
-function test_modify() { 
-  sendCommand(`makeRequest("http://localhost:${PORT}/testSimple", "${replacedBody}");`);
-}
-
-
-function stopServer() {
-  observer.unregister();
-  httpserver.stop(do_test_finished)
-}
-
-function run_test() {
-
-  observer = new HttpResponseExaminer();
-  observer.register();
-
-  httpserver.registerPathHandler("/testSimple", test_handlerSimple);
-
-  run_test_in_child("child_tracable_listener.js", test_modify);
-}
--- a/netwerk/test/unit_ipc/xpcshell.ini
+++ b/netwerk/test/unit_ipc/xpcshell.ini
@@ -1,16 +1,15 @@
 [DEFAULT]
 head = head_channels_clone.js head_cc.js
 tail =
 skip-if = toolkit == 'android' || toolkit == 'gonk'
 support-files = child_app_offline.js
   child_app_offline_notifications.js
   child_channel_id.js
-  child_tracable_listener.js
   !/netwerk/test/unit/test_XHR_redirects.js
   !/netwerk/test/unit/test_bug248970_cookie.js
   !/netwerk/test/unit/test_bug528292.js
   !/netwerk/test/unit/test_cache_jar.js
   !/netwerk/test/unit/test_cacheflags.js
   !/netwerk/test/unit/test_channel_close.js
   !/netwerk/test/unit/test_cookie_header.js
   !/netwerk/test/unit/test_cookiejars.js
@@ -92,10 +91,8 @@ skip-if = true
 [test_XHR_redirects.js]
 [test_redirect_history_wrap.js]
 [test_reply_without_content_type_wrap.js]
 [test_app_offline_http.js]
 [test_getHost_wrap.js]
 [test_app_offline_notifications.js]
 [test_original_sent_received_head_wrap.js]
 [test_channel_id.js]
-[test_traceable_channel_modify_response.js]
-[test_traceable_channel_decoded_data.js]