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

Delta Between Two Patch Sets: lib/compat.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Left Patch Set: Add arrow-parens rule to match existing convention Created March 7, 2017, 10:48 a.m.
Right Patch Set: Use .includes again Created March 31, 2017, 8:37 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « include.preload.js ('k') | lib/csp.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2017 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 *
(...skipping 12 matching lines...) Expand all
26 if (!(module in require.scopes)) 26 if (!(module in require.scopes))
27 { 27 {
28 let scope = {exports: {}}; 28 let scope = {exports: {}};
29 require.scopes[module] = require.modules[module](scope, scope.exports); 29 require.scopes[module] = require.modules[module](scope, scope.exports);
30 } 30 }
31 return require.scopes[module]; 31 return require.scopes[module];
32 } 32 }
33 require.modules = Object.create(null); 33 require.modules = Object.create(null);
34 require.scopes = Object.create(null); 34 require.scopes = Object.create(null);
35 35
36 function importAll(module, globalObj)
37 {
38 let exports = require(module);
39 for (let key in exports)
40 globalObj[key] = exports[key];
41 }
42
43 let onShutdown = { 36 let onShutdown = {
44 done: false, 37 done: false,
45 add() {}, 38 add() {},
46 remove() {} 39 remove() {}
47 }; 40 };
48 41
49 // 42 //
50 // XPCOM emulation 43 // XPCOM emulation
51 // 44 //
52 45
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // FileUtils.jsm module emulation 206 // FileUtils.jsm module emulation
214 // 207 //
215 208
216 let FileUtils = { 209 let FileUtils = {
217 PERMS_DIRECTORY: 0 210 PERMS_DIRECTORY: 0
218 }; 211 };
219 212
220 function FakeTimer() 213 function FakeTimer()
221 { 214 {
222 } 215 }
223 FakeTimer.prototype = { 216 FakeTimer.prototype =
217 {
224 delay: 0, 218 delay: 0,
225 callback: null, 219 callback: null,
226 initWithCallback(callback, delay) 220 initWithCallback(callback, delay)
227 { 221 {
228 this.callback = callback; 222 this.callback = callback;
229 this.delay = delay; 223 this.delay = delay;
230 this.scheduleTimeout(); 224 this.scheduleTimeout();
231 }, 225 },
232 scheduleTimeout() 226 scheduleTimeout()
233 { 227 {
(...skipping 20 matching lines...) Expand all
254 status: -1, 248 status: -1,
255 notificationCallbacks: {}, 249 notificationCallbacks: {},
256 loadFlags: 0, 250 loadFlags: 0,
257 INHIBIT_CACHING: 0, 251 INHIBIT_CACHING: 0,
258 VALIDATE_ALWAYS: 0, 252 VALIDATE_ALWAYS: 0,
259 QueryInterface() 253 QueryInterface()
260 { 254 {
261 return this; 255 return this;
262 } 256 }
263 }; 257 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld