Bug 1240912 - Beacon filtering no longer needed. r=ochameau draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 03 Aug 2016 18:13:52 -0500
changeset 398324 814af2431bb94ed2a9c4ac267233a39fce145a0b
parent 397822 e78975b53563d80c99ebfbdf8a9fbf6b829a8a48
child 398325 62447486c5a860382feb03f6d04489de6b6816a4
child 399420 abb3da9b296c8407b9aed0caf55797aa8385e9eb
child 402154 d41922ed221158046e1a448318cc193b8873f068
child 402162 7f4043a6226d5ba95b51b96ae487297fe446a699
push id25496
push userbmo:jryans@gmail.com
push dateTue, 09 Aug 2016 00:03:49 +0000
reviewersochameau
bugs1240912
milestone51.0a1
Bug 1240912 - Beacon filtering no longer needed. r=ochameau MozReview-Commit-ID: EQ4HrvGFBiq
devtools/shared/webconsole/network-monitor.js
--- a/devtools/shared/webconsole/network-monitor.js
+++ b/devtools/shared/webconsole/network-monitor.js
@@ -107,35 +107,16 @@ function matchRequest(channel, filters) 
 
   if (filters.appId) {
     let appId = NetworkHelper.getAppIdForRequest(channel);
     if (appId && appId == filters.appId) {
       return true;
     }
   }
 
-  // The following check is necessary because beacon channels don't come
-  // associated with a load group. Bug 1160837 will hopefully introduce a
-  // platform fix that will render the following code entirely useless.
-  if (channel.loadInfo &&
-      channel.loadInfo.externalContentPolicyType ==
-      Ci.nsIContentPolicy.TYPE_BEACON) {
-    let nonE10sMatch = filters.window &&
-        channel.loadInfo.loadingDocument === filters.window.document;
-    const loadingPrincipal = channel.loadInfo.loadingPrincipal;
-    let e10sMatch = filters.topFrame &&
-        filters.topFrame.contentPrincipal &&
-        filters.topFrame.contentPrincipal.equals(loadingPrincipal) &&
-        filters.topFrame.contentPrincipal.URI.spec == channel.referrer.spec;
-    let b2gMatch = filters.appId && loadingPrincipal.appId === filters.appId;
-    if (nonE10sMatch || e10sMatch || b2gMatch) {
-      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";