From b916935256ee533c0caa6f398916f74671f9e288 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 8 Dec 2011 01:28:57 -0500 Subject: [PATCH] Replace direct nsITimer call with setTimeout() --- 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 index 86a53a1a82..40cab4c050 100644 --- 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