www

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

commit c46432181128a01343cb24298b5ea061c97ef99f
parent 344bd1fb74d8a6ab5b66279c25c1d6c89527a6a9
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu, 26 Jul 2012 08:55:38 -0400

Alternative approach to rescuing JIT in Zotero.setTimeout/Zotero.pumpGenerator

Diffstat:
Mchrome/content/zotero/xpcom/zotero.js | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -1475,8 +1475,11 @@ Components.utils.import("resource://gre/modules/Services.jsm"); var timer = Components.classes["@mozilla.org/timer;1"]. createInstance(Components.interfaces.nsITimer), - yielded; + yielded, + useJIT = Components.utils.methodjit; var timerCallback = {"notify":function() { + Components.utils.methodjit = useJIT; + var err = false; _waiting--; try { @@ -1537,8 +1540,11 @@ Components.utils.import("resource://gre/modules/Services.jsm"); */ this.setTimeout = function(func, ms, runWhenWaiting) { var timer = Components.classes["@mozilla.org/timer;1"]. - createInstance(Components.interfaces.nsITimer); + createInstance(Components.interfaces.nsITimer), + useJIT = Components.utils.methodjit; var timerCallback = {"notify":function() { + Components.utils.methodjit = useJIT; + if(_waiting && !runWhenWaiting) { // if our callback gets called during Zotero.wait(), queue it to be set again // when Zotero.wait() completes