Bug 1479524 - Remove unused appId filter. r=jdescottes
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 02 Aug 2018 11:41:48 -0700
changeset 487074 7f6bb6c2bc018d3a25a877f62e79ed103661ea7b
parent 487073 0f25b95e97408a4dfcb5ff223c130cec304c6d5e
child 487075 fa0a81fe2da6ad958c1c1dc910e58afb1ba3c6b5
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1479524
milestone63.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 1479524 - Remove unused appId filter. r=jdescottes MozReview-Commit-ID: FwIX9dQ4c83
devtools/shared/webconsole/network-helper.js
devtools/shared/webconsole/network-monitor.js
--- a/devtools/shared/webconsole/network-helper.js
+++ b/devtools/shared/webconsole/network-helper.js
@@ -194,32 +194,16 @@ var NetworkHelper = {
 
         return this.readAndConvertFromStream(descriptor, charset);
       }
     }
     return null;
   },
 
   /**
-   * Gets the web appId that is associated with request.
-   *
-   * @param nsIHttpChannel request
-   * @returns number|null
-   *          The appId for the given request, if available.
-   */
-  getAppIdForRequest: function(request) {
-    try {
-      return this.getRequestLoadContext(request).appId;
-    } catch (ex) {
-      // request loadContent is not always available.
-    }
-    return null;
-  },
-
-  /**
    * Gets the topFrameElement that is associated with request. This
    * works in single-process and multiprocess contexts. It may cross
    * the content/chrome boundary.
    *
    * @param nsIHttpChannel request
    * @returns Element|null
    *          The top frame element for the given request.
    */
--- a/devtools/shared/webconsole/network-monitor.js
+++ b/devtools/shared/webconsole/network-monitor.js
@@ -42,17 +42,17 @@ const HTTP_TEMPORARY_REDIRECT = 307;
  *        Request to check.
  * @param filters
  *        NetworkMonitor filters to match against.
  * @return boolean
  *         True if the network request should be logged, false otherwise.
  */
 function matchRequest(channel, filters) {
   // Log everything if no filter is specified
-  if (!filters.outerWindowID && !filters.window && !filters.appId) {
+  if (!filters.outerWindowID && !filters.window) {
     return true;
   }
 
   // Ignore requests from chrome or add-on code when we are monitoring
   // content.
   // TODO: one particular test (browser_styleeditor_fetch-from-cache.js) needs
   // the flags.testing check. We will move to a better way to serve
   // its needs in bug 1167188, where this check should be removed.
@@ -88,23 +88,16 @@ function matchRequest(channel, filters) 
         }
       } catch (e) {
         // outerWindowID getter from browser.xml (non-remote <xul:browser>) may
         // throw when closing a tab while resources are still loading.
       }
     }
   }
 
-  if (filters.appId) {
-    const appId = NetworkHelper.getAppIdForRequest(channel);
-    if (appId && appId == filters.appId) {
-      return true;
-    }
-  }
-
   return false;
 }
 
 /**
  * This is a nsIChannelEventSink implementation that monitors channel redirects and
  * informs the registered StackTraceCollector about the old and new channels.
  */
 const SINK_CLASS_DESCRIPTION = "NetworkMonitor Channel Event Sink";
@@ -765,17 +758,16 @@ NetworkResponseListener.prototype = {
  * http-on-examine-response notifications. All network request information is
  * routed to the remote Web Console.
  *
  * @constructor
  * @param object filters
  *        Object with the filters to use for network requests:
  *        - window (nsIDOMWindow): filter network requests by the associated
  *          window object.
- *        - appId (number): filter requests by the appId.
  *        - outerWindowID (number): filter requests by their top frame's outerWindowID.
  *        Filters are optional. If any of these filters match the request is
  *        logged (OR is applied). If no filter is provided then all requests are
  *        logged.
  * @param object owner
  *        The network monitor owner. This object needs to hold:
  *        - onNetworkEvent(requestInfo)
  *          This method is invoked once for every new network request and it is