From 214d85786161b50f9e3d56bbb6cbad0feab5ed27 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 27 Oct 2010 02:45:04 +0000 Subject: [PATCH] fix startup error on Fx 3.6 --- 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 index c07731928..28c4ec58b 100644 --- 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)