Replace direct nsITimer call with setTimeout()

This commit is contained in:
Dan Stillman 2011-12-08 01:28:57 -05:00
parent eeedc49274
commit b916935256

View file

@ -328,11 +328,9 @@ Zotero.Attachments = new function(){
// if it fails
//
// TODO: index later
var timer = Components.classes["@mozilla.org/timer;1"].
createInstance(Components.interfaces.nsITimer);
timer.initWithCallback({notify: function() {
setTimeout(function() {
Zotero.Fulltext.indexItems([itemID]);
}}, 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
}, 1000);
}
catch (e) {
// Clean up