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", {}); |
| 15 SDK.require("sdk/tabs"); |
| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 return oldFinish.apply(this, arguments); | 527 return oldFinish.apply(this, arguments); |
525 } | 528 } |
526 window.addEventListener("unload", function() | 529 window.addEventListener("unload", function() |
527 { | 530 { |
528 debuggerService.off(); | 531 debuggerService.off(); |
529 }, true); | 532 }, true); |
530 debuggerService.on(); | 533 debuggerService.on(); |
531 debuggerService.flags |= debuggerService.COLLECT_PROFILE_DATA; | 534 debuggerService.flags |= debuggerService.COLLECT_PROFILE_DATA; |
532 debuggerService.clearProfileData(); | 535 debuggerService.clearProfileData(); |
533 } | 536 } |
OLD | NEW |