|
|
@ -1,6 +1,6 @@ |
|
|
|
(function () { // annonymous namespace
|
|
|
|
|
|
|
|
// deprecation errors
|
|
|
|
/** deprecation errors ************************************************/ |
|
|
|
|
|
|
|
GLOBAL.__module = function () { |
|
|
|
throw new Error("'__module' has been renamed to 'module'"); |
|
|
@ -70,6 +70,51 @@ node.inherits = function () { |
|
|
|
throw new Error("node.inherits() has moved. Use require('sys') to access it."); |
|
|
|
}; |
|
|
|
|
|
|
|
/**********************************************************************/ |
|
|
|
|
|
|
|
// Module
|
|
|
|
|
|
|
|
function Module (id, parent) { |
|
|
|
this.id = id; |
|
|
|
this.exports = {}; |
|
|
|
this.parent = parent; |
|
|
|
|
|
|
|
this.filename = null; |
|
|
|
this.loaded = false; |
|
|
|
this.loadPromise = null; |
|
|
|
this.exited = false; |
|
|
|
this.children = []; |
|
|
|
}; |
|
|
|
|
|
|
|
var moduleCache = {}; |
|
|
|
|
|
|
|
function createModule (id, parent) { |
|
|
|
if (id in moduleCache) { |
|
|
|
debug("found " + JSON.stringify(id) + " in cache"); |
|
|
|
return moduleCache[id]; |
|
|
|
} |
|
|
|
debug("didn't found " + JSON.stringify(id) + " in cache. creating new module"); |
|
|
|
var m = new Module(id, parent); |
|
|
|
moduleCache[id] = m; |
|
|
|
return m; |
|
|
|
}; |
|
|
|
|
|
|
|
function createInternalModule (id, constructor) { |
|
|
|
var m = createModule(id); |
|
|
|
constructor(m.exports); |
|
|
|
m.loaded = true; |
|
|
|
return m; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
process.inherits = function (ctor, superCtor) { |
|
|
|
var tempCtor = function(){}; |
|
|
|
tempCtor.prototype = superCtor.prototype; |
|
|
|
ctor.super_ = superCtor; |
|
|
|
ctor.prototype = new tempCtor(); |
|
|
|
ctor.prototype.constructor = ctor; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
process.createChildProcess = function (file, args, env) { |
|
|
|
var child = new process.ChildProcess(); |
|
|
@ -147,194 +192,189 @@ process.mixin = function() { |
|
|
|
return target; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// Event
|
|
|
|
|
|
|
|
// process.EventEmitter is defined in src/events.cc
|
|
|
|
// process.EventEmitter.prototype.emit() is also defined there.
|
|
|
|
process.EventEmitter.prototype.addListener = function (type, listener) { |
|
|
|
if (listener instanceof Function) { |
|
|
|
if (!this._events) this._events = {}; |
|
|
|
if (!this._events.hasOwnProperty(type)) this._events[type] = []; |
|
|
|
// To avoid recursion in the case that type == "newListeners"! Before
|
|
|
|
// adding it to the listeners, first emit "newListeners".
|
|
|
|
this.emit("newListener", type, listener); |
|
|
|
this._events[type].push(listener); |
|
|
|
} |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|
process.EventEmitter.prototype.removeListener = function (type, listener) { |
|
|
|
if (listener instanceof Function) { |
|
|
|
// does not use listeners(), so no side effect of creating _events[type]
|
|
|
|
if (!this._events || !this._events.hasOwnProperty(type)) return; |
|
|
|
var list = this._events[type]; |
|
|
|
if (list.indexOf(listener) < 0) return; |
|
|
|
list.splice(list.indexOf(listener), 1); |
|
|
|
} |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|
process.EventEmitter.prototype.listeners = function (type) { |
|
|
|
if (!this._events) this._events = {}; |
|
|
|
if (!this._events.hasOwnProperty(type)) this._events[type] = []; |
|
|
|
return this._events[type]; |
|
|
|
}; |
|
|
|
|
|
|
|
process.inherits = function (ctor, superCtor) { |
|
|
|
var tempCtor = function(){}; |
|
|
|
tempCtor.prototype = superCtor.prototype; |
|
|
|
ctor.super_ = superCtor; |
|
|
|
ctor.prototype = new tempCtor(); |
|
|
|
ctor.prototype.constructor = ctor; |
|
|
|
}; |
|
|
|
var eventsModule = createInternalModule('events', function (exports) { |
|
|
|
exports.EventEmitter = process.EventEmitter; |
|
|
|
|
|
|
|
// process.EventEmitter is defined in src/events.cc
|
|
|
|
// process.EventEmitter.prototype.emit() is also defined there.
|
|
|
|
process.EventEmitter.prototype.addListener = function (type, listener) { |
|
|
|
if (listener instanceof Function) { |
|
|
|
if (!this._events) this._events = {}; |
|
|
|
if (!this._events.hasOwnProperty(type)) this._events[type] = []; |
|
|
|
// To avoid recursion in the case that type == "newListeners"! Before
|
|
|
|
// adding it to the listeners, first emit "newListeners".
|
|
|
|
this.emit("newListener", type, listener); |
|
|
|
this._events[type].push(listener); |
|
|
|
} |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|
process.EventEmitter.prototype.removeListener = function (type, listener) { |
|
|
|
if (listener instanceof Function) { |
|
|
|
// does not use listeners(), so no side effect of creating _events[type]
|
|
|
|
if (!this._events || !this._events.hasOwnProperty(type)) return; |
|
|
|
var list = this._events[type]; |
|
|
|
if (list.indexOf(listener) < 0) return; |
|
|
|
list.splice(list.indexOf(listener), 1); |
|
|
|
} |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|
// Promise
|
|
|
|
process.EventEmitter.prototype.listeners = function (type) { |
|
|
|
if (!this._events) this._events = {}; |
|
|
|
if (!this._events.hasOwnProperty(type)) this._events[type] = []; |
|
|
|
return this._events[type]; |
|
|
|
}; |
|
|
|
|
|
|
|
process.Promise = function () { |
|
|
|
process.EventEmitter.call(); |
|
|
|
this._blocking = false; |
|
|
|
this._hasFired = false; |
|
|
|
}; |
|
|
|
process.inherits(process.Promise, process.EventEmitter); |
|
|
|
exports.Promise = function () { |
|
|
|
exports.EventEmitter.call(); |
|
|
|
this._blocking = false; |
|
|
|
this._hasFired = false; |
|
|
|
}; |
|
|
|
process.inherits(exports.Promise, exports.EventEmitter); |
|
|
|
|
|
|
|
process.Promise.prototype.timeout = function(timeout) { |
|
|
|
if (timeout === undefined) { |
|
|
|
return this._timeoutDuration; |
|
|
|
} |
|
|
|
process.Promise = exports.Promise; |
|
|
|
|
|
|
|
this._timeoutDuration = timeout; |
|
|
|
if (this._timer) { |
|
|
|
clearTimeout(this._timer); |
|
|
|
this._timer = null; |
|
|
|
} |
|
|
|
exports.Promise.prototype.timeout = function(timeout) { |
|
|
|
if (timeout === undefined) { |
|
|
|
return this._timeoutDuration; |
|
|
|
} |
|
|
|
|
|
|
|
var promiseComplete = false; |
|
|
|
var onComplete = function() { |
|
|
|
promiseComplete = true; |
|
|
|
this._timeoutDuration = timeout; |
|
|
|
if (this._timer) { |
|
|
|
clearTimeout(this._timer); |
|
|
|
this._timer = null; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
this |
|
|
|
.addCallback(onComplete) |
|
|
|
.addCancelback(onComplete) |
|
|
|
.addErrback(onComplete); |
|
|
|
var promiseComplete = false; |
|
|
|
var onComplete = function() { |
|
|
|
promiseComplete = true; |
|
|
|
if (this._timer) { |
|
|
|
clearTimeout(this._timer); |
|
|
|
this._timer = null; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
var self = this; |
|
|
|
this._timer = setTimeout(function() { |
|
|
|
self._timer = null; |
|
|
|
if (promiseComplete) { |
|
|
|
return; |
|
|
|
} |
|
|
|
this |
|
|
|
.addCallback(onComplete) |
|
|
|
.addCancelback(onComplete) |
|
|
|
.addErrback(onComplete); |
|
|
|
|
|
|
|
self.emitError(new Error('timeout')); |
|
|
|
}, this._timeoutDuration); |
|
|
|
var self = this; |
|
|
|
this._timer = setTimeout(function() { |
|
|
|
self._timer = null; |
|
|
|
if (promiseComplete) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
return this; |
|
|
|
}; |
|
|
|
self.emitError(new Error('timeout')); |
|
|
|
}, this._timeoutDuration); |
|
|
|
|
|
|
|
process.Promise.prototype.cancel = function() { |
|
|
|
if(this._cancelled) return; |
|
|
|
this._cancelled = true; |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|
this._events['success'] = []; |
|
|
|
this._events['error'] = []; |
|
|
|
exports.Promise.prototype.cancel = function() { |
|
|
|
if(this._cancelled) return; |
|
|
|
this._cancelled = true; |
|
|
|
|
|
|
|
this.emitCancel(); |
|
|
|
}; |
|
|
|
this._events['success'] = []; |
|
|
|
this._events['error'] = []; |
|
|
|
|
|
|
|
process.Promise.prototype.emitCancel = function() { |
|
|
|
Array.prototype.unshift.call(arguments, 'cancel') |
|
|
|
this.emit.apply(this, arguments); |
|
|
|
}; |
|
|
|
this.emitCancel(); |
|
|
|
}; |
|
|
|
|
|
|
|
process.Promise.prototype.emitSuccess = function() { |
|
|
|
if (this.hasFired) return; |
|
|
|
this.hasFired = true; |
|
|
|
Array.prototype.unshift.call(arguments, 'success') |
|
|
|
this.emit.apply(this, arguments); |
|
|
|
}; |
|
|
|
exports.Promise.prototype.emitCancel = function() { |
|
|
|
Array.prototype.unshift.call(arguments, 'cancel') |
|
|
|
this.emit.apply(this, arguments); |
|
|
|
}; |
|
|
|
|
|
|
|
process.Promise.prototype.emitError = function() { |
|
|
|
if (this.hasFired) return; |
|
|
|
this.hasFired = true; |
|
|
|
Array.prototype.unshift.call(arguments, 'error') |
|
|
|
this.emit.apply(this, arguments); |
|
|
|
}; |
|
|
|
exports.Promise.prototype.emitSuccess = function() { |
|
|
|
if (this.hasFired) return; |
|
|
|
this.hasFired = true; |
|
|
|
Array.prototype.unshift.call(arguments, 'success') |
|
|
|
this.emit.apply(this, arguments); |
|
|
|
}; |
|
|
|
|
|
|
|
process.Promise.prototype.addCallback = function (listener) { |
|
|
|
this.addListener("success", listener); |
|
|
|
return this; |
|
|
|
}; |
|
|
|
exports.Promise.prototype.emitError = function() { |
|
|
|
if (this.hasFired) return; |
|
|
|
this.hasFired = true; |
|
|
|
Array.prototype.unshift.call(arguments, 'error') |
|
|
|
this.emit.apply(this, arguments); |
|
|
|
}; |
|
|
|
|
|
|
|
process.Promise.prototype.addErrback = function (listener) { |
|
|
|
this.addListener("error", listener); |
|
|
|
return this; |
|
|
|
}; |
|
|
|
exports.Promise.prototype.addCallback = function (listener) { |
|
|
|
this.addListener("success", listener); |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|
process.Promise.prototype.addCancelback = function (listener) { |
|
|
|
this.addListener("cancel", listener); |
|
|
|
return this; |
|
|
|
}; |
|
|
|
exports.Promise.prototype.addErrback = function (listener) { |
|
|
|
this.addListener("error", listener); |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|
/* Poor Man's coroutines */ |
|
|
|
var coroutineStack = []; |
|
|
|
exports.Promise.prototype.addCancelback = function (listener) { |
|
|
|
this.addListener("cancel", listener); |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|
process.Promise.prototype._destack = function () { |
|
|
|
this._blocking = false; |
|
|
|
/* Poor Man's coroutines */ |
|
|
|
var coroutineStack = []; |
|
|
|
|
|
|
|
while (coroutineStack.length > 0 && |
|
|
|
!coroutineStack[coroutineStack.length-1]._blocking) |
|
|
|
{ |
|
|
|
coroutineStack.pop(); |
|
|
|
process.unloop("one"); |
|
|
|
} |
|
|
|
}; |
|
|
|
exports.Promise.prototype._destack = function () { |
|
|
|
this._blocking = false; |
|
|
|
|
|
|
|
process.Promise.prototype.wait = function () { |
|
|
|
var self = this; |
|
|
|
var ret; |
|
|
|
var hadError = false; |
|
|
|
|
|
|
|
self.addCallback(function () { |
|
|
|
if (arguments.length == 1) { |
|
|
|
ret = arguments[0]; |
|
|
|
} else if (arguments.length > 1) { |
|
|
|
ret = Array.prototype.slice.call(arguments); |
|
|
|
while (coroutineStack.length > 0 && |
|
|
|
!coroutineStack[coroutineStack.length-1]._blocking) |
|
|
|
{ |
|
|
|
coroutineStack.pop(); |
|
|
|
process.unloop("one"); |
|
|
|
} |
|
|
|
self._destack(); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
self.addErrback(function (arg) { |
|
|
|
hadError = true; |
|
|
|
ret = arg; |
|
|
|
self._destack(); |
|
|
|
}); |
|
|
|
exports.Promise.prototype.wait = function () { |
|
|
|
var self = this; |
|
|
|
var ret; |
|
|
|
var hadError = false; |
|
|
|
|
|
|
|
coroutineStack.push(self); |
|
|
|
if (coroutineStack.length > 10) { |
|
|
|
process.stdio.writeError("WARNING: promise.wait() is being called too often.\n"); |
|
|
|
} |
|
|
|
self._blocking = true; |
|
|
|
self.addCallback(function () { |
|
|
|
if (arguments.length == 1) { |
|
|
|
ret = arguments[0]; |
|
|
|
} else if (arguments.length > 1) { |
|
|
|
ret = Array.prototype.slice.call(arguments); |
|
|
|
} |
|
|
|
self._destack(); |
|
|
|
}); |
|
|
|
|
|
|
|
process.loop(); |
|
|
|
self.addErrback(function (arg) { |
|
|
|
hadError = true; |
|
|
|
ret = arg; |
|
|
|
self._destack(); |
|
|
|
}); |
|
|
|
|
|
|
|
process.assert(self._blocking == false); |
|
|
|
coroutineStack.push(self); |
|
|
|
if (coroutineStack.length > 10) { |
|
|
|
process.stdio.writeError("WARNING: promise.wait() is being called too often.\n"); |
|
|
|
} |
|
|
|
self._blocking = true; |
|
|
|
|
|
|
|
if (hadError) { |
|
|
|
if (ret) { |
|
|
|
throw ret; |
|
|
|
} else { |
|
|
|
throw new Error("Promise completed with error (No arguments given.)"); |
|
|
|
process.loop(); |
|
|
|
|
|
|
|
process.assert(self._blocking == false); |
|
|
|
|
|
|
|
if (hadError) { |
|
|
|
if (ret) { |
|
|
|
throw ret; |
|
|
|
} else { |
|
|
|
throw new Error("Promise completed with error (No arguments given.)"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return ret; |
|
|
|
}; |
|
|
|
return ret; |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
var events = eventsModule.exports; |
|
|
|
|
|
|
|
|
|
|
|
// Signal Handlers
|
|
|
@ -465,38 +505,6 @@ function debug (x) { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// private constructor
|
|
|
|
function Module (id, parent) { |
|
|
|
this.id = id; |
|
|
|
this.exports = {}; |
|
|
|
this.parent = parent; |
|
|
|
|
|
|
|
this.filename = null; |
|
|
|
this.loaded = false; |
|
|
|
this.loadPromise = null; |
|
|
|
this.exited = false; |
|
|
|
this.children = []; |
|
|
|
}; |
|
|
|
|
|
|
|
var moduleCache = {}; |
|
|
|
|
|
|
|
function createModule (id, parent) { |
|
|
|
if (id in moduleCache) { |
|
|
|
debug("found " + JSON.stringify(id) + " in cache"); |
|
|
|
return moduleCache[id]; |
|
|
|
} |
|
|
|
debug("didn't found " + JSON.stringify(id) + " in cache. creating new module"); |
|
|
|
var m = new Module(id, parent); |
|
|
|
moduleCache[id] = m; |
|
|
|
return m; |
|
|
|
}; |
|
|
|
|
|
|
|
function createInternalModule (id, constructor) { |
|
|
|
var m = createModule(id); |
|
|
|
constructor(m.exports); |
|
|
|
m.loaded = true; |
|
|
|
return m; |
|
|
|
}; |
|
|
|
|
|
|
|
var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
exports.Stats = process.Stats; |
|
|
@ -515,7 +523,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
// list to make the arguments clear.
|
|
|
|
|
|
|
|
exports.close = function (fd) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
process.fs.close(fd, callback(promise)); |
|
|
|
return promise; |
|
|
|
}; |
|
|
@ -525,7 +533,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.open = function (path, flags, mode) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
process.fs.open(path, flags, mode, callback(promise)); |
|
|
|
return promise; |
|
|
|
}; |
|
|
@ -535,7 +543,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.read = function (fd, length, position, encoding) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
encoding = encoding || "binary"; |
|
|
|
process.fs.read(fd, length, position, encoding, callback(promise)); |
|
|
|
return promise; |
|
|
@ -547,7 +555,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.write = function (fd, data, position, encoding) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
encoding = encoding || "binary"; |
|
|
|
process.fs.write(fd, data, position, encoding, callback(promise)); |
|
|
|
return promise; |
|
|
@ -559,7 +567,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.rename = function (oldPath, newPath) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
process.fs.rename(oldPath, newPath, callback(promise)); |
|
|
|
return promise; |
|
|
|
}; |
|
|
@ -569,7 +577,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.rmdir = function (path) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
process.fs.rmdir(path, callback(promise)); |
|
|
|
return promise; |
|
|
|
}; |
|
|
@ -579,7 +587,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.mkdir = function (path, mode) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
process.fs.mkdir(path, mode, callback(promise)); |
|
|
|
return promise; |
|
|
|
}; |
|
|
@ -589,7 +597,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.sendfile = function (outFd, inFd, inOffset, length) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
process.fs.sendfile(outFd, inFd, inOffset, length, callback(promise)); |
|
|
|
return promise; |
|
|
|
}; |
|
|
@ -599,7 +607,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.readdir = function (path) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
process.fs.readdir(path, callback(promise)); |
|
|
|
return promise; |
|
|
|
}; |
|
|
@ -609,7 +617,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.stat = function (path) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
process.fs.stat(path, callback(promise)); |
|
|
|
return promise; |
|
|
|
}; |
|
|
@ -619,7 +627,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
}; |
|
|
|
|
|
|
|
exports.unlink = function (path) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
process.fs.unlink(path, callback(promise)); |
|
|
|
return promise; |
|
|
|
}; |
|
|
@ -630,7 +638,7 @@ var posixModule = createInternalModule("posix", function (exports) { |
|
|
|
|
|
|
|
|
|
|
|
exports.cat = function (path, encoding) { |
|
|
|
var promise = new process.Promise(); |
|
|
|
var promise = new events.Promise(); |
|
|
|
|
|
|
|
encoding = encoding || "utf8"; // default to utf8
|
|
|
|
|
|
|
@ -799,7 +807,7 @@ function findModulePath (id, dirs, callback) { |
|
|
|
|
|
|
|
function loadModule (request, parent) { |
|
|
|
// This is the promise which is actually returned from require.async()
|
|
|
|
var loadPromise = new process.Promise(); |
|
|
|
var loadPromise = new events.Promise(); |
|
|
|
|
|
|
|
// debug("loadModule REQUEST " + (request) + " parent: " + JSON.stringify(parent));
|
|
|
|
|
|
|
@ -873,7 +881,7 @@ function cat (id, loadPromise) { |
|
|
|
debug(id); |
|
|
|
|
|
|
|
if (id.match(/^http:\/\//)) { |
|
|
|
promise = new process.Promise(); |
|
|
|
promise = new events.Promise(); |
|
|
|
loadModule('http', process.mainModule) |
|
|
|
.addCallback(function(http) { |
|
|
|
http.cat(id) |
|
|
@ -973,7 +981,7 @@ if (process.ARGV[1].charAt(0) != "/" && !(/^http:\/\//).exec(process.ARGV[1])) { |
|
|
|
|
|
|
|
// Load the main module--the command line argument.
|
|
|
|
process.mainModule = createModule("."); |
|
|
|
var loadPromise = new process.Promise(); |
|
|
|
var loadPromise = new events.Promise(); |
|
|
|
process.mainModule.load(process.ARGV[1], loadPromise); |
|
|
|
|
|
|
|
loadPromise.addErrback(function(e) { |
|
|
|