commit b916935256ee533c0caa6f398916f74671f9e288 parent eeedc49274d638c1903e6f362f6f083980ca85c3 Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 8 Dec 2011 01:28:57 -0500 Replace direct nsITimer call with setTimeout() Diffstat:
| M | chrome/content/zotero/xpcom/attachments.js | | | 6 | ++---- |
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js @@ -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