From 90dd0f34e038f739cd2b4971eb1bea7fbbc1c70e Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 3 Oct 2011 01:27:15 +0000 Subject: [PATCH] Defer add-on manager load until it's necessary --- chrome/content/zotero/xpcom/zotero.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index c6385a497f..d58d3e5733 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -38,13 +38,6 @@ const ZOTERO_CONFIG = { VERSION: "3.0b3.SVN" }; -// Load AddonManager for Firefox 4 -var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]. - getService(Components.interfaces.nsIXULAppInfo); -if(appInfo.platformVersion[0] >= 2) { - Components.utils.import("resource://gre/modules/AddonManager.jsm"); -} - /* * Core functions */ @@ -1260,6 +1253,7 @@ if(appInfo.platformVersion[0] >= 2) { } if(this.isFx4) { + Components.utils.import("resource://gre/modules/AddonManager.jsm"); AddonManager.getAllAddons(onHaveInstalledAddons); } else { var em = Components.classes["@mozilla.org/extensions/manager;1"].