1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 02:12:27 +01:00

"use strict"

This commit is contained in:
Kris Maglione
2012-12-18 17:15:59 -08:00
parent 9479a32a91
commit 21b8780ceb

12
common/bootstrap.js vendored
View File

@@ -5,6 +5,7 @@
// //
// See https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions // See https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions
// for details. // for details.
"use strict";
const global = this; const global = this;
@@ -16,9 +17,9 @@ const DEBUG = true;
__defineGetter__("BOOTSTRAP", function () "resource://" + moduleName + "/bootstrap.jsm"); __defineGetter__("BOOTSTRAP", function () "resource://" + moduleName + "/bootstrap.jsm");
const { AddonManager } = module("resource://gre/modules/AddonManager.jsm"); var { AddonManager } = module("resource://gre/modules/AddonManager.jsm");
const { XPCOMUtils } = module("resource://gre/modules/XPCOMUtils.jsm"); var { XPCOMUtils } = module("resource://gre/modules/XPCOMUtils.jsm");
const { Services } = module("resource://gre/modules/Services.jsm"); var { Services } = module("resource://gre/modules/Services.jsm");
const resourceProto = Services.io.getProtocolHandler("resource") const resourceProto = Services.io.getProtocolHandler("resource")
.QueryInterface(Ci.nsIResProtocolHandler); .QueryInterface(Ci.nsIResProtocolHandler);
@@ -262,8 +263,7 @@ function init() {
Services.obs.notifyObservers(null, "dactyl-rehash", null); Services.obs.notifyObservers(null, "dactyl-rehash", null);
JSMLoader.name = name; JSMLoader.bootstrap = global;
JSMLoader.bootstrap = this;
JSMLoader.load("config", global); JSMLoader.load("config", global);
JSMLoader.load("main", global); JSMLoader.load("main", global);
@@ -300,8 +300,8 @@ function init() {
* Performs necessary migrations after a version change. * Performs necessary migrations after a version change.
*/ */
function updateVersion() { function updateVersion() {
try {
function isDev(ver) /^hg|pre$/.test(ver); function isDev(ver) /^hg|pre$/.test(ver);
try {
if (typeof require === "undefined" || addon === addonData) if (typeof require === "undefined" || addon === addonData)
return; return;