Alternative approach to rescuing JIT in Zotero.setTimeout/Zotero.pumpGenerator
This commit is contained in:
parent
344bd1fb74
commit
c464321811
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue