| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 const Cc = Components.classes; | 1 const Cc = Components.classes; |
| 2 const Ci = Components.interfaces; | 2 const Ci = Components.interfaces; |
| 3 const Cr = Components.results; | 3 const Cr = Components.results; |
| 4 const Cu = Components.utils; | 4 const Cu = Components.utils; |
| 5 | 5 |
| 6 const MILLIS_IN_SECOND = 1000; | 6 const MILLIS_IN_SECOND = 1000; |
| 7 const MILLIS_IN_MINUTE = 60 * MILLIS_IN_SECOND; | 7 const MILLIS_IN_MINUTE = 60 * MILLIS_IN_SECOND; |
| 8 const MILLIS_IN_HOUR = 60 * MILLIS_IN_MINUTE; | 8 const MILLIS_IN_HOUR = 60 * MILLIS_IN_MINUTE; |
| 9 const MILLIS_IN_DAY = 24 * MILLIS_IN_HOUR; | 9 const MILLIS_IN_DAY = 24 * MILLIS_IN_HOUR; |
| 10 | 10 |
| 11 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); | 11 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); |
| 12 Cu.import("resource://gre/modules/Services.jsm"); | 12 Cu.import("resource://gre/modules/Services.jsm"); |
| 13 | 13 |
| 14 const SDK = Cu.import("resource://gre/modules/commonjs/toolkit/require.js", {}); | |
|
Wladimir Palant
2015/12/14 11:28:51
I added dev-doc-needed keyword to https://bugzilla
| |
| 15 SDK.require("sdk/tabs"); | |
|
Wladimir Palant
2015/12/14 11:28:51
This line seems unnecessary?
| |
| 16 | |
| 14 function require(module) | 17 function require(module) |
| 15 { | 18 { |
| 16 let result = {}; | 19 let result = {}; |
| 17 result.wrappedJSObject = result; | 20 result.wrappedJSObject = result; |
| 18 Services.obs.notifyObservers(result, "adblockplus-require", module); | 21 Services.obs.notifyObservers(result, "adblockplus-require", module); |
| 19 return result.exports; | 22 return result.exports; |
| 20 } | 23 } |
| 21 | 24 |
| 22 function getModuleGlobal(module) | 25 function getModuleGlobal(module) |
| 23 { | 26 { |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 521 return oldFinish.apply(this, arguments); | 524 return oldFinish.apply(this, arguments); |
| 522 } | 525 } |
| 523 window.addEventListener("unload", function() | 526 window.addEventListener("unload", function() |
| 524 { | 527 { |
| 525 debuggerService.off(); | 528 debuggerService.off(); |
| 526 }, true); | 529 }, true); |
| 527 debuggerService.on(); | 530 debuggerService.on(); |
| 528 debuggerService.flags |= debuggerService.COLLECT_PROFILE_DATA; | 531 debuggerService.flags |= debuggerService.COLLECT_PROFILE_DATA; |
| 529 debuggerService.clearProfileData(); | 532 debuggerService.clearProfileData(); |
| 530 } | 533 } |
| OLD | NEW |