summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/bluebird/js/browser/bluebird.core.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/bluebird/js/browser/bluebird.core.js')
-rw-r--r--deps/npm/node_modules/bluebird/js/browser/bluebird.core.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/deps/npm/node_modules/bluebird/js/browser/bluebird.core.js b/deps/npm/node_modules/bluebird/js/browser/bluebird.core.js
index 3ed2f6a689..6adcea1d6d 100644
--- a/deps/npm/node_modules/bluebird/js/browser/bluebird.core.js
+++ b/deps/npm/node_modules/bluebird/js/browser/bluebird.core.js
@@ -23,7 +23,7 @@
*
*/
/**
- * bluebird build version 3.5.0
+ * bluebird build version 3.5.1
* Features enabled: core
* Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
*/
@@ -559,7 +559,10 @@ Promise.prototype.suppressUnhandledRejections = function() {
Promise.prototype._ensurePossibleRejectionHandled = function () {
if ((this._bitField & 524288) !== 0) return;
this._setRejectionIsUnhandled();
- async.invokeLater(this._notifyUnhandledRejection, this, undefined);
+ var self = this;
+ setTimeout(function() {
+ self._notifyUnhandledRejection();
+ }, 1);
};
Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
@@ -2848,7 +2851,7 @@ _dereq_("./synchronous_inspection")(Promise);
_dereq_("./join")(
Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);
Promise.Promise = Promise;
-Promise.version = "3.5.0";
+Promise.version = "3.5.1";
util.toFastProperties(Promise);
util.toFastProperties(Promise.prototype);
@@ -3618,10 +3621,11 @@ function safeToString(obj) {
}
function isError(obj) {
- return obj !== null &&
+ return obj instanceof Error ||
+ (obj !== null &&
typeof obj === "object" &&
typeof obj.message === "string" &&
- typeof obj.name === "string";
+ typeof obj.name === "string");
}
function markAsOriginatingFromRejection(e) {