Bug 859372 - Make Timer a built-in module; r=past

This commit is contained in:
Eddy Bruel 2014-04-24 13:15:58 +02:00
parent 673cad14b4
commit 8487128364
2 changed files with 4 additions and 1 deletions

View File

@ -10,7 +10,7 @@
// on the main thread, and false if we are running on a worker thread.
var { Ci, Cu } = require("chrome");
var Services = require("Services");
var setTimeout = Cu.import("resource://gre/modules/Timer.jsm", {}).setTimeout;
var { setTimeout } = require("Timer");
/**
* Turn the error |aError| into a string, without fail.

View File

@ -23,6 +23,7 @@ let Debugger = sandbox.Debugger;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
let Timer = Cu.import("resource://gre/modules/Timer.jsm", {});
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils", "resource://gre/modules/FileUtils.jsm");
@ -63,6 +64,7 @@ BuiltinProvider.prototype = {
modules: {
"Debugger": Debugger,
"Services": Object.create(Services),
"Timer": Object.create(Timer),
"toolkit/loader": loader,
"source-map": SourceMap,
},
@ -141,6 +143,7 @@ SrcdirProvider.prototype = {
modules: {
"Debugger": Debugger,
"Services": Object.create(Services),
"Timer": Object.create(Timer),
"toolkit/loader": loader,
"source-map": SourceMap,
},