diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-11 07:03:16 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-11 07:03:16 -0500 |
commit | 203eb0f61a09372310a2a8fb57e169cb3f47800b (patch) | |
tree | 8490329d3dae4de3c7ffd127bce1f65fdc009abd /toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js | |
parent | e45706ca3acbb6530419433212becc61d5953a2d (diff) | |
parent | 8f6d3dab81c7f8f97ef197e26ab9439b09735b8f (diff) | |
download | UXP-203eb0f61a09372310a2a8fb57e169cb3f47800b.tar UXP-203eb0f61a09372310a2a8fb57e169cb3f47800b.tar.gz UXP-203eb0f61a09372310a2a8fb57e169cb3f47800b.tar.lz UXP-203eb0f61a09372310a2a8fb57e169cb3f47800b.tar.xz UXP-203eb0f61a09372310a2a8fb57e169cb3f47800b.zip |
Merge branch 'ext-work'FF_Checkpoint_1
Diffstat (limited to 'toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js')
-rw-r--r-- | toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js b/toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js new file mode 100644 index 000000000..f8a62bcaa --- /dev/null +++ b/toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js @@ -0,0 +1,29 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); + +let seenGlobals = new Set(); +let scope = this; +function checkGlobal(name, type) { + if (scope[name] && typeof(scope[name]) == type) + seenGlobals.add(name); +} + +let wrapped = {}; +Services.obs.notifyObservers({ wrappedJSObject: wrapped }, "bootstrap-request-globals", null); +for (let [name, type] of wrapped.expectedGlobals) { + checkGlobal(name, type); +} + +function install(data, reason) { +} + +function startup(data, reason) { + Services.obs.notifyObservers({ + wrappedJSObject: seenGlobals + }, "bootstrap-seen-globals", null); +} + +function shutdown(data, reason) { +} + +function uninstall(data, reason) { +} |