www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 8cb081a4e1aed5d6a0d0b1f5e679fd133036be8a
parent dd5160cc73a926bfd58f5d38bc0a6dbf30e3b446
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon, 23 Jun 2014 22:55:02 -0400

Disable argument unwrapping on Fx < 32

This apparently breaks on Fx 24

Diffstat:
Mchrome/content/zotero/xpcom/translation/translate_firefox.js | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -462,9 +462,14 @@ Zotero.Translate.SandboxManager.prototype = { if(isFunction) { attachTo[localKey] = function() { var args = Array.prototype.slice.apply(arguments); - for(var i=0; i<args.length; i++) { - if(typeof args[i] === "object" && args[i] !== null && args[i].wrappedJSObject) { - args[i] = args[i].wrappedJSObject; + if(Zotero.platformMajorVersion >= 32) { + // This is necessary on Nightly and works + // fine on 31, but apparently ZU.xpath in + // an unusual way on 24 + for(var i=0; i<args.length; i++) { + if(typeof args[i] === "object" && args[i] !== null && args[i].wrappedJSObject) { + args[i] = args[i].wrappedJSObject; + } } } if(passAsFirstArgument) args.unshift(passAsFirstArgument);