Bug 1398622 - Followup patch to fix beta difference from m-c. r=kmag, a=bustage DEVEDITION_56_0b12_RELEASE FIREFOX_56_0b12_BUILD1 FIREFOX_56_0b12_RELEASE
authorShane Caraveo <scaraveo@mozilla.com>
Wed, 13 Sep 2017 19:20:00 -0400
changeset 424101 fbef00b40b98333a637211cd284db9e3f5348f07
parent 424100 faf98f63da30ed2715f6a51d45cbc84dd76efeb4
child 424102 1c08a2f4d2fc14e2a88915a2bd8f033f04c058ab
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag, bustage
bugs1398622
milestone56.0
Bug 1398622 - Followup patch to fix beta difference from m-c. r=kmag, a=bustage
toolkit/modules/addons/WebRequest.jsm
--- a/toolkit/modules/addons/WebRequest.jsm
+++ b/toolkit/modules/addons/WebRequest.jsm
@@ -682,17 +682,17 @@ HttpObserverManager = {
     } else if (lastActivity !== this.GOOD_LAST_ACTIVITY &&
                lastActivity !== nsIHttpActivityObserver.ACTIVITY_SUBTYPE_TRANSACTION_CLOSE) {
       channelData.lastActivity = activitySubtype;
     }
   },
 
   shouldRunListener(policyType, uri, filter) {
     // force the protocol to be ws again.
-    if (policyType == "websocket" && ["http", "https"].includes(uri.scheme)) {
+    if (policyType == Ci.nsIContentPolicy.TYPE_WEBSOCKET && ["http", "https"].includes(uri.scheme)) {
       uri = Services.io.newURI(`ws${uri.spec.substring(4)}`);
     }
     return WebRequestCommon.typeMatches(policyType, filter.types) &&
            WebRequestCommon.urlMatches(uri, filter.urls);
   },
 
   get resultsMap() {
     delete this.resultsMap;