Index: messageResponder.js |
=================================================================== |
--- a/messageResponder.js |
+++ b/messageResponder.js |
@@ -12,18 +12,19 @@ |
* GNU General Public License for more details. |
* |
* You should have received a copy of the GNU General Public License |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
"use strict"; |
+(function(global) |
kzar
2017/03/10 13:42:33
Why pass `this` as the `global` instead of referri
Wladimir Palant
2017/03/12 08:16:18
Because that's assumptions about the global object
kzar
2017/03/13 07:47:24
Acknowledged.
|
{ |
- var ext = ext || require("ext_background"); |
+ let ext = global.ext || require("ext_background"); |
const {port} = require("messaging"); |
const {Prefs} = require("prefs"); |
const {Utils} = require("utils"); |
const {FilterStorage} = require("filterStorage"); |
const {FilterNotifier} = require("filterNotifier"); |
const {defaultMatcher} = require("matcher"); |
const {ElemHideEmulation} = require("elemHideEmulation"); |
@@ -419,9 +420,9 @@ |
let subscriptions = message.url ? [Subscription.fromURL(message.url)] : |
FilterStorage.subscriptions; |
for (let subscription of subscriptions) |
{ |
if (subscription instanceof DownloadableSubscription) |
Synchronizer.execute(subscription, true); |
} |
}); |
-} |
+})(this); |