Don't allow functions queued with setTimeout() to execute during Zotero.wait()

Fixes fatal error during import
This commit is contained in:
Simon Kornblith 2011-05-31 19:59:07 +00:00
parent 58a3680ca5
commit 3f69b8b9c0
2 changed files with 36 additions and 8 deletions

View file

@ -214,14 +214,8 @@ function confirm(msg){
/**
* Convenience method to replicate window.setTimeout()
**/
// TODO: is this still used? if so, move to zotero.js
function setTimeout(func, ms){
var timer = Components.classes["@mozilla.org/timer;1"].
createInstance(Components.interfaces.nsITimer);
// {} implements nsITimerCallback
timer.initWithCallback({notify:func}, ms,
Components.interfaces.nsITimer.TYPE_ONE_SHOT);
return timer;
function setTimeout(func, ms) {
Zotero.setTimeout(func, ms);
}