Bug 1267033 - Ensure QI to nsIHttpChannel before trying to merge status info. r=kmag, a=test-only
authorGiorgio Maone <g.maone@informaction.com>
Wed, 27 Apr 2016 18:11:32 +0200
changeset 335058 6fed4247ab98d682083cef66b03df65fff41a47c
parent 335057 21a7e88e2cc80ba9b6325ebcd7481548554c76e7
child 335059 67974e06189741827c7c40457d43a0ad917dfff6
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag, test-only
bugs1267033
milestone48.0a2
Bug 1267033 - Ensure QI to nsIHttpChannel before trying to merge status info. r=kmag, a=test-only MozReview-Commit-ID: 5kZndCaQmPr
toolkit/modules/addons/WebRequest.jsm
--- a/toolkit/modules/addons/WebRequest.jsm
+++ b/toolkit/modules/addons/WebRequest.jsm
@@ -500,20 +500,22 @@ HttpObserverManager = {
     let loadInfo = channel.loadInfo;
     let policyType = loadInfo ?
                      loadInfo.externalContentPolicyType :
                      Ci.nsIContentPolicy.TYPE_OTHER;
 
     let requestHeaderNames;
     let responseHeaderNames;
 
-    let includeStatus = kind === "headersReceived" ||
-                        kind === "onRedirect" ||
-                        kind === "onStart" ||
-                        kind === "onStop";
+    let includeStatus = (
+                          kind === "headersReceived" ||
+                          kind === "onRedirect" ||
+                          kind === "onStart" ||
+                          kind === "onStop"
+                        ) && channel instanceof Ci.nsIHttpChannel;
 
     let commonData = null;
     let uri = channel.URI;
     for (let [callback, opts] of listeners.entries()) {
       if (!this.shouldRunListener(policyType, uri, opts.filter)) {
         continue;
       }