commit 214d85786161b50f9e3d56bbb6cbad0feab5ed27 parent e0e84bc22a6743ba14b381bb5db14fccef774546 Author: Simon Kornblith <simon@simonster.com> Date: Wed, 27 Oct 2010 02:45:04 +0000 fix startup error on Fx 3.6 Diffstat:
| M | chrome/content/zotero/xpcom/zotero.js | | | 12 | +++++++++--- |
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -36,9 +36,13 @@ const ZOTERO_CONFIG = { PREF_BRANCH: 'extensions.zotero.' }; -// Fx4.0b8+ use implicit SJOWs; no creation necessary -if(!XPCSafeJSObjectWrapper) { - var XPCSafeJSObjectWrapper = function(arg) { return arg }; +// Fx4.0b8+ use implicit SJOWs and get rid of explicit XPCSafeJSObjectWrapper constructor +// Ugly hack to get around this until we can just kill the XPCSafeJSObjectWrapper calls (when we +// drop Fx3.6 support) +try { + XPCSafeJSObjectWrapper; +} catch(e) { + eval("var XPCSafeJSObjectWrapper = function(arg) { return arg }"); } /* @@ -215,6 +219,8 @@ var Zotero = new function(){ } } + this.isConnector = false; + // OS platform var win = Components.classes["@mozilla.org/appshell/appShellService;1"] .getService(Components.interfaces.nsIAppShellService)