commit 95003c88e4f5d05e2f7aea9c166f3f3f7ab752aa
parent 9740c426667fd6a669965362d57f9a41edcd9584
Author: Simon Kornblith <simon@simonster.com>
Date: Sun, 24 Oct 2010 06:52:54 +0000
fix translation in Fx 4 trunk builds
Diffstat:
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js
@@ -1016,7 +1016,20 @@ Zotero.Translate.prototype._generateSandbox = function() {
translation.setHandler(arg1,
function(obj, item) {
try {
- arg2(obj, item);
+ if(Zotero.isFx4) {
+ // item is wrapped in an XPCCrossOriginWrapper that we can't get rid of
+ // except by making a deep copy. seems to be due to
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=580128
+ // hear that? that's the sound of me banging my head against the wall.
+ // if there is no better way to do this soon, i am going to need a
+ // brain transplant...
+ var unwrappedItem = JSON.parse(JSON.stringify(item));
+ unwrappedItem.complete = item.complete;
+ } else {
+ var unwrappedItem = item;
+ }
+
+ arg2(obj, unwrappedItem);
} catch(e) {
me.error(false, e);
}