| Index: test/_common.js |
| =================================================================== |
| --- a/test/_common.js |
| +++ b/test/_common.js |
| @@ -26,19 +26,20 @@ |
| NS_BINDING_ABORTED: 0x804B0002, |
| NS_ERROR_FAILURE: 0x80004005 |
| }; |
| const MILLIS_IN_SECOND = exports.MILLIS_IN_SECOND = 1000; |
| const MILLIS_IN_MINUTE = exports.MILLIS_IN_MINUTE = 60 * MILLIS_IN_SECOND; |
| const MILLIS_IN_HOUR = exports.MILLIS_IN_HOUR = 60 * MILLIS_IN_MINUTE; |
| -function URL(urlString) |
| +// URL is global in Node 10. In Node 7+ it must be imported. |
|
kzar
2018/05/16 13:24:31
(Thanks for noting the versions involved here.)
|
| +if (global.URL == undefined) |
|
kzar
2018/05/16 13:24:31
I wonder why we put it in the global Object here,
hub
2018/05/16 18:33:23
The previous polyfill was to define `function URL(
kzar
2018/05/17 09:49:01
Well for some longer functions we declare them ear
hub
2018/05/17 12:50:46
I had no doubt this would be working.
Done.
|
| { |
| - return require("url").parse(urlString); |
| + global.URL = require("url").URL; |
| } |
| let Services = { |
| obs: { |
| addObserver() {} |
| } |
| }; |
| let XPCOMUtils = { |