Left: | ||
Right: |
OLD | NEW |
---|---|
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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 |
(...skipping 13 matching lines...) Expand all Loading... | |
24 const Cr = exports.Cr = { | 24 const Cr = exports.Cr = { |
25 NS_OK: 0, | 25 NS_OK: 0, |
26 NS_BINDING_ABORTED: 0x804B0002, | 26 NS_BINDING_ABORTED: 0x804B0002, |
27 NS_ERROR_FAILURE: 0x80004005 | 27 NS_ERROR_FAILURE: 0x80004005 |
28 }; | 28 }; |
29 | 29 |
30 const MILLIS_IN_SECOND = exports.MILLIS_IN_SECOND = 1000; | 30 const MILLIS_IN_SECOND = exports.MILLIS_IN_SECOND = 1000; |
31 const MILLIS_IN_MINUTE = exports.MILLIS_IN_MINUTE = 60 * MILLIS_IN_SECOND; | 31 const MILLIS_IN_MINUTE = exports.MILLIS_IN_MINUTE = 60 * MILLIS_IN_SECOND; |
32 const MILLIS_IN_HOUR = exports.MILLIS_IN_HOUR = 60 * MILLIS_IN_MINUTE; | 32 const MILLIS_IN_HOUR = exports.MILLIS_IN_HOUR = 60 * MILLIS_IN_MINUTE; |
33 | 33 |
34 function URL(urlString) | |
kzar
2018/05/15 14:08:58
What's with this change?
hub
2018/05/15 16:16:31
This one is required: it was a polyfill for the UR
hub
2018/05/15 16:17:53
And I must add: this is only used in the tests.
kzar
2018/05/16 09:22:40
I think this was for Node.js 7 compatability which
Sebastian Noack
2018/05/16 10:53:29
I'm on Node.js 8.5, and there is no global URL obj
hub
2018/05/16 12:08:11
According to the documentation, it was added in No
Sebastian Noack
2018/05/16 12:13:22
Yes, the code here could be changed to:
const {
hub
2018/05/16 13:11:49
It is global in NodeJS 10.
See https://nodejs.org/
| |
35 { | |
36 return require("url").parse(urlString); | |
37 } | |
38 | |
39 let Services = { | 34 let Services = { |
40 obs: { | 35 obs: { |
41 addObserver() {} | 36 addObserver() {} |
42 } | 37 } |
43 }; | 38 }; |
44 let XPCOMUtils = { | 39 let XPCOMUtils = { |
45 generateQI() {} | 40 generateQI() {} |
46 }; | 41 }; |
47 let FileUtils = {}; | 42 let FileUtils = {}; |
48 let resources = {Services, XPCOMUtils, FileUtils}; | 43 let resources = {Services, XPCOMUtils, FileUtils}; |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
409 } | 404 } |
410 }) | 405 }) |
411 }; | 406 }; |
412 }; | 407 }; |
413 | 408 |
414 exports.unexpectedError = function(error) | 409 exports.unexpectedError = function(error) |
415 { | 410 { |
416 console.error(error); | 411 console.error(error); |
417 this.ok(false, "Unexpected error: " + error); | 412 this.ok(false, "Unexpected error: " + error); |
418 }; | 413 }; |
OLD | NEW |