From b7ee2cf8470a43f89e657855bffd4e5042fc74b7 Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Mon, 4 Nov 2013 00:43:52 +0900 Subject: [PATCH] Use Timer.jsm in module/base.js --- modules/base.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/base.js b/modules/base.js index 53ab2f7c..f7780580 100644 --- a/modules/base.js +++ b/modules/base.js @@ -41,6 +41,7 @@ const Cu = Components.utils; Cu.import('resource://gre/modules/XPCOMUtils.jsm'); Cu.import('resource://gre/modules/Services.jsm'); +Cu.import("resource://gre/modules/Timer.jsm"); Cu.import('resource://treestyletab-modules/constants.js'); XPCOMUtils.defineLazyGetter(this, 'window', function() { @@ -51,11 +52,6 @@ XPCOMUtils.defineLazyGetter(this, 'prefs', function() { Cu.import('resource://treestyletab-modules/lib/prefs.js'); return window['piro.sakura.ne.jp'].prefs; }); -XPCOMUtils.defineLazyGetter(this, 'jstimer', function() { - var jstimer = {}; - Cu.import('resource://treestyletab-modules/lib/jstimer.jsm', jstimer); - return jstimer; -}); XPCOMUtils.defineLazyGetter(this, 'extensions', function() { Cu.import('resource://treestyletab-modules/lib/extensions.js', {}); return window['piro.sakura.ne.jp'].extensions; @@ -535,7 +531,7 @@ var TreeStyleTabBase = { var done = false; var listener = function(aEvent) { - jstimer.setTimeout(function() { + setTimeout(function() { done = true; }, delay || 0); target.removeEventListener(type, listener, false);