From 80b10184b0f91bdf49c17df1aacd9f8267438cac Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 15 Apr 2013 14:52:51 -0400 Subject: [PATCH] Fix race condition when running bookmarklet from Standalone server --- chrome/content/zotero/xpcom/connector/connector.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/connector/connector.js b/chrome/content/zotero/xpcom/connector/connector.js index 64ad77912..4b0cf8de8 100644 --- a/chrome/content/zotero/xpcom/connector/connector.js +++ b/chrome/content/zotero/xpcom/connector/connector.js @@ -74,7 +74,8 @@ Zotero.Connector = new function() { _ieConnectorCallbacks = []; var listener = function(event) { - if(event.origin !== "http://127.0.0.1:23119") return; + if(event.origin !== "http://127.0.0.1:23119" + || event.source !== iframe.contentWindow) return; if(event.stopPropagation) { event.stopPropagation(); } else {