From eb5421d686f1400aea8641bfa562c9d4d3954b6b Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 21 Jun 2016 08:04:31 -0400 Subject: [PATCH] minor code review (HTTP observer) --- platform/firefox/vapi-background.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 9239578b8..a7e4b5139 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -2191,16 +2191,12 @@ var httpObserver = { // Behind-the-scene request... Yes, really. if ( pendingRequest === null ) { - if ( this.handleRequest(channel, URI, { tabId: vAPI.noTabId, rawtype: rawtype }) ) { - return; - } - - // Carry data for behind-the-scene redirects - if ( channel instanceof Ci.nsIWritablePropertyBag ) { - channel.setProperty(this.REQDATAKEY, [0, -1, vAPI.noTabId, rawtype]); - } - - return; + pendingRequest = { + frameId: 0, + parentFrameId: -1, + tabId: vAPI.noTabId, + rawtype: rawtype + }; } // https://github.com/gorhill/uBlock/issues/654