Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: messageResponder.js

Issue 29379570: Issue 4968 - Fix messageResponder syntax, declaring functions inside a block not allowed in strict … (Closed) Base URL: https://hg.adblockplus.org/adblockplusui
Patch Set: Created March 9, 2017, 11:14 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 "use strict"; 18 "use strict";
19 19
20 (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.
20 { 21 {
21 var ext = ext || require("ext_background"); 22 let ext = global.ext || require("ext_background");
22 23
23 const {port} = require("messaging"); 24 const {port} = require("messaging");
24 const {Prefs} = require("prefs"); 25 const {Prefs} = require("prefs");
25 const {Utils} = require("utils"); 26 const {Utils} = require("utils");
26 const {FilterStorage} = require("filterStorage"); 27 const {FilterStorage} = require("filterStorage");
27 const {FilterNotifier} = require("filterNotifier"); 28 const {FilterNotifier} = require("filterNotifier");
28 const {defaultMatcher} = require("matcher"); 29 const {defaultMatcher} = require("matcher");
29 const {ElemHideEmulation} = require("elemHideEmulation"); 30 const {ElemHideEmulation} = require("elemHideEmulation");
30 const {Notification: NotificationStorage} = require("notification"); 31 const {Notification: NotificationStorage} = require("notification");
31 32
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 port.on("subscriptions.update", (message, sender) => 418 port.on("subscriptions.update", (message, sender) =>
418 { 419 {
419 let subscriptions = message.url ? [Subscription.fromURL(message.url)] : 420 let subscriptions = message.url ? [Subscription.fromURL(message.url)] :
420 FilterStorage.subscriptions; 421 FilterStorage.subscriptions;
421 for (let subscription of subscriptions) 422 for (let subscription of subscriptions)
422 { 423 {
423 if (subscription instanceof DownloadableSubscription) 424 if (subscription instanceof DownloadableSubscription)
424 Synchronizer.execute(subscription, true); 425 Synchronizer.execute(subscription, true);
425 } 426 }
426 }); 427 });
427 } 428 })(this);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld