commit 867760e0be1f00b53296ca1b129e02d6894fb0f2 parent c9354535da1a4117a7413e441caf5149c644f46b Author: Simon Kornblith <simon@simonster.com> Date: Mon, 2 Apr 2012 18:09:10 -0400 pushEventQueue removed in Fx 14 (https://bugzilla.mozilla.org/show_bug.cgi?id=719154) Diffstat:
| M | chrome/content/zotero/fileInterface.js | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js @@ -626,7 +626,12 @@ var Zotero_File_Interface = new function() { if(window.zoteroLastRepaint && (now - window.zoteroLastRepaint) < 100) return // Start a nested event queue - Zotero.mainThread.pushEventQueue(null); + // TODO Remove when Fx > 14 + var eventQueuePushed = "pushEventQueue" in Zotero.mainThread; + if(eventQueuePushed) { + Zotero.mainThread.pushEventQueue(null); + } + try { // Add the redraw event onto event queue window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) @@ -637,7 +642,7 @@ var Zotero_File_Interface = new function() { Zotero.mainThread.processNextEvent(false); } finally { // Close nested event queue - Zotero.mainThread.popEventQueue(); + if(eventQueuePushed) Zotero.mainThread.popEventQueue(); } window.zoteroLastRepaint = now;