Bug 1479524 - Remove unused appId filter. r=jdescottes
MozReview-Commit-ID: FwIX9dQ4c83
--- 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