Skip to content

Commit

Permalink
Release v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
petkaantonov committed Jan 28, 2014
1 parent 70f01e4 commit 7104fd2
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 54 deletions.
22 changes: 10 additions & 12 deletions browser/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3819,7 +3819,7 @@ var captureStackTrace = (function stackDetection() {
typeof "".startsWith === "function" &&
(err.stack.startsWith("stackDetection@")) &&
stackDetection.name === "stackDetection") {

defineProperty(Error, "stackTraceLimit", {
writable: true,
enumerable: false,
Expand Down Expand Up @@ -4124,15 +4124,15 @@ function ensureNotHandled(reason) {

function markAsOriginatingFromRejection(e) {
try {
notEnumerableProp(e, "__rejectionError__", RejectionError);
notEnumerableProp(e, "isAsync", true);
}
catch(ignore) {}
}

function originatesFromRejection(e) {
if (e == null) return false;
return ((e instanceof RejectionError) ||
e["__rejectionError__"] === RejectionError);
e["isAsync"] === true);
}

function attachDefaultState(obj) {
Expand Down Expand Up @@ -4162,6 +4162,7 @@ function canAttach(obj) {

function subError(nameProperty, defaultMessage) {
function SubError(message) {
if (!(this instanceof SubError)) return new SubError(message);
this.message = typeof message === "string" ? message : defaultMessage;
this.name = nameProperty;
if (Error.captureStackTrace) {
Expand All @@ -4187,6 +4188,7 @@ function RejectionError(message) {
this.name = "RejectionError";
this.message = message;
this.cause = message;
this.isAsync = true;

if (message instanceof Error) {
this.message = message.message;
Expand Down Expand Up @@ -5260,7 +5262,7 @@ Promise.method = function Promise$_Method(fn) {
};
};

Promise["try"] = Promise.attempt = function Promise$_Try(fn, args, ctx) {
Promise.attempt = Promise["try"] = function Promise$_Try(fn, args, ctx) {

if (typeof fn !== "function") {
return apiRejection("fn must be a function");
Expand Down Expand Up @@ -8230,9 +8232,7 @@ module.exports = function(Promise, INTERNAL) {
ms = value;
value = void 0;
}
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;
if (typeof caller !== "function") {
caller = Promise.delay;
}
Expand Down Expand Up @@ -8265,9 +8265,7 @@ module.exports = function(Promise, INTERNAL) {
};

Promise.prototype.timeout = function Promise$timeout(ms, message) {
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;

var ret = new Promise(INTERNAL);
ret._setTrace(this.timeout, this);
Expand Down Expand Up @@ -8912,7 +8910,7 @@ var captureStackTrace = (function stackDetection() {
typeof "".startsWith === "function" &&
(err.stack.startsWith("stackDetection@")) &&
stackDetection.name === "stackDetection") {

defineProperty(Error, "stackTraceLimit", {
writable: true,
enumerable: false,
Expand Down Expand Up @@ -9745,7 +9743,7 @@ Promise.method = function Promise$_Method(fn) {
};
};

Promise["try"] = Promise.attempt = function Promise$_Try(fn, args, ctx) {
Promise.attempt = Promise["try"] = function Promise$_Try(fn, args, ctx) {

if (typeof fn !== "function") {
return apiRejection("fn must be a function");
Expand Down
20 changes: 9 additions & 11 deletions js/browser/bluebird.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* bluebird build version 1.0.0
* bluebird build version 1.0.1
* Features enabled: core, timers, race, any, call_get, filter, generators, map, nodeify, promisify, props, reduce, settle, some, progress, cancel, synchronous_inspection
*/
/**
Expand Down Expand Up @@ -584,7 +584,7 @@ var captureStackTrace = (function stackDetection() {
typeof "".startsWith === "function" &&
(err.stack.startsWith("stackDetection@")) &&
stackDetection.name === "stackDetection") {

defineProperty(Error, "stackTraceLimit", {
writable: true,
enumerable: false,
Expand Down Expand Up @@ -885,15 +885,15 @@ function ensureNotHandled(reason) {

function markAsOriginatingFromRejection(e) {
try {
notEnumerableProp(e, "__rejectionError__", RejectionError);
notEnumerableProp(e, "isAsync", true);
}
catch(ignore) {}
}

function originatesFromRejection(e) {
if (e == null) return false;
return ((e instanceof RejectionError) ||
e["__rejectionError__"] === RejectionError);
e["isAsync"] === true);
}

function attachDefaultState(obj) {
Expand Down Expand Up @@ -923,6 +923,7 @@ function canAttach(obj) {

function subError(nameProperty, defaultMessage) {
function SubError(message) {
if (!(this instanceof SubError)) return new SubError(message);
this.message = typeof message === "string" ? message : defaultMessage;
this.name = nameProperty;
if (Error.captureStackTrace) {
Expand All @@ -948,6 +949,7 @@ function RejectionError(message) {
this.name = "RejectionError";
this.message = message;
this.cause = message;
this.isAsync = true;

if (message instanceof Error) {
this.message = message.message;
Expand Down Expand Up @@ -1993,7 +1995,7 @@ Promise.method = function Promise$_Method(fn) {
};
};

Promise["try"] = Promise.attempt = function Promise$_Try(fn, args, ctx) {
Promise.attempt = Promise["try"] = function Promise$_Try(fn, args, ctx) {

if (typeof fn !== "function") {
return apiRejection("fn must be a function");
Expand Down Expand Up @@ -4797,9 +4799,7 @@ module.exports = function(Promise, INTERNAL) {
ms = value;
value = void 0;
}
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;
if (typeof caller !== "function") {
caller = Promise.delay;
}
Expand Down Expand Up @@ -4832,9 +4832,7 @@ module.exports = function(Promise, INTERNAL) {
};

Promise.prototype.timeout = function Promise$timeout(ms, message) {
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;

var ret = new Promise(INTERNAL);
ret._setTrace(this.timeout, this);
Expand Down
2 changes: 1 addition & 1 deletion js/debug/captured_trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ var captureStackTrace = (function stackDetection() {
typeof "".startsWith === "function" &&
(err.stack.startsWith("stackDetection@")) &&
stackDetection.name === "stackDetection") {

defineProperty(Error, "stackTraceLimit", {
writable: true,
enumerable: false,
Expand Down
6 changes: 4 additions & 2 deletions js/debug/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ function ensureNotHandled(reason) {

function markAsOriginatingFromRejection(e) {
try {
notEnumerableProp(e, "__rejectionError__", RejectionError);
notEnumerableProp(e, "isAsync", true);
}
catch(ignore) {}
}

function originatesFromRejection(e) {
if (e == null) return false;
return ((e instanceof RejectionError) ||
e["__rejectionError__"] === RejectionError);
e["isAsync"] === true);
}

function attachDefaultState(obj) {
Expand Down Expand Up @@ -97,6 +97,7 @@ function canAttach(obj) {

function subError(nameProperty, defaultMessage) {
function SubError(message) {
if (!(this instanceof SubError)) return new SubError(message);
this.message = typeof message === "string" ? message : defaultMessage;
this.name = nameProperty;
if (Error.captureStackTrace) {
Expand All @@ -122,6 +123,7 @@ function RejectionError(message) {
this.name = "RejectionError";
this.message = message;
this.cause = message;
this.isAsync = true;

if (message instanceof Error) {
this.message = message.message;
Expand Down
2 changes: 1 addition & 1 deletion js/debug/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ Promise.method = function Promise$_Method(fn) {
};
};

Promise["try"] = Promise.attempt = function Promise$_Try(fn, args, ctx) {
Promise.attempt = Promise["try"] = function Promise$_Try(fn, args, ctx) {

if (typeof fn !== "function") {
return apiRejection("fn must be a function");
Expand Down
8 changes: 2 additions & 6 deletions js/debug/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ module.exports = function(Promise, INTERNAL) {
ms = value;
value = void 0;
}
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;
if (typeof caller !== "function") {
caller = Promise.delay;
}
Expand Down Expand Up @@ -98,9 +96,7 @@ module.exports = function(Promise, INTERNAL) {
};

Promise.prototype.timeout = function Promise$timeout(ms, message) {
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;

var ret = new Promise(INTERNAL);
ret._setTrace(this.timeout, this);
Expand Down
2 changes: 1 addition & 1 deletion js/main/captured_trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ var captureStackTrace = (function stackDetection() {
typeof "".startsWith === "function" &&
(err.stack.startsWith("stackDetection@")) &&
stackDetection.name === "stackDetection") {

defineProperty(Error, "stackTraceLimit", {
writable: true,
enumerable: false,
Expand Down
6 changes: 4 additions & 2 deletions js/main/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ function ensureNotHandled(reason) {

function markAsOriginatingFromRejection(e) {
try {
notEnumerableProp(e, "__rejectionError__", RejectionError);
notEnumerableProp(e, "isAsync", true);
}
catch(ignore) {}
}

function originatesFromRejection(e) {
if (e == null) return false;
return ((e instanceof RejectionError) ||
e["__rejectionError__"] === RejectionError);
e["isAsync"] === true);
}

function attachDefaultState(obj) {
Expand Down Expand Up @@ -97,6 +97,7 @@ function canAttach(obj) {

function subError(nameProperty, defaultMessage) {
function SubError(message) {
if (!(this instanceof SubError)) return new SubError(message);
this.message = typeof message === "string" ? message : defaultMessage;
this.name = nameProperty;
if (Error.captureStackTrace) {
Expand All @@ -122,6 +123,7 @@ function RejectionError(message) {
this.name = "RejectionError";
this.message = message;
this.cause = message;
this.isAsync = true;

if (message instanceof Error) {
this.message = message.message;
Expand Down
2 changes: 1 addition & 1 deletion js/main/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ Promise.method = function Promise$_Method(fn) {
};
};

Promise["try"] = Promise.attempt = function Promise$_Try(fn, args, ctx) {
Promise.attempt = Promise["try"] = function Promise$_Try(fn, args, ctx) {

if (typeof fn !== "function") {
return apiRejection("fn must be a function");
Expand Down
8 changes: 2 additions & 6 deletions js/main/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ module.exports = function(Promise, INTERNAL) {
ms = value;
value = void 0;
}
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;
if (typeof caller !== "function") {
caller = Promise.delay;
}
Expand Down Expand Up @@ -98,9 +96,7 @@ module.exports = function(Promise, INTERNAL) {
};

Promise.prototype.timeout = function Promise$timeout(ms, message) {
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;

var ret = new Promise(INTERNAL);
ret._setTrace(this.timeout, this);
Expand Down
2 changes: 1 addition & 1 deletion js/zalgo/captured_trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ var captureStackTrace = (function stackDetection() {
typeof "".startsWith === "function" &&
(err.stack.startsWith("stackDetection@")) &&
stackDetection.name === "stackDetection") {

defineProperty(Error, "stackTraceLimit", {
writable: true,
enumerable: false,
Expand Down
6 changes: 4 additions & 2 deletions js/zalgo/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ function ensureNotHandled(reason) {

function markAsOriginatingFromRejection(e) {
try {
notEnumerableProp(e, "__rejectionError__", RejectionError);
notEnumerableProp(e, "isAsync", true);
}
catch(ignore) {}
}

function originatesFromRejection(e) {
if (e == null) return false;
return ((e instanceof RejectionError) ||
e["__rejectionError__"] === RejectionError);
e["isAsync"] === true);
}

function attachDefaultState(obj) {
Expand Down Expand Up @@ -97,6 +97,7 @@ function canAttach(obj) {

function subError(nameProperty, defaultMessage) {
function SubError(message) {
if (!(this instanceof SubError)) return new SubError(message);
this.message = typeof message === "string" ? message : defaultMessage;
this.name = nameProperty;
if (Error.captureStackTrace) {
Expand All @@ -122,6 +123,7 @@ function RejectionError(message) {
this.name = "RejectionError";
this.message = message;
this.cause = message;
this.isAsync = true;

if (message instanceof Error) {
this.message = message.message;
Expand Down
2 changes: 1 addition & 1 deletion js/zalgo/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ Promise.method = function Promise$_Method(fn) {
};
};

Promise["try"] = Promise.attempt = function Promise$_Try(fn, args, ctx) {
Promise.attempt = Promise["try"] = function Promise$_Try(fn, args, ctx) {

if (typeof fn !== "function") {
return apiRejection("fn must be a function");
Expand Down
8 changes: 2 additions & 6 deletions js/zalgo/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ module.exports = function(Promise, INTERNAL) {
ms = value;
value = void 0;
}
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;
if (typeof caller !== "function") {
caller = Promise.delay;
}
Expand Down Expand Up @@ -98,9 +96,7 @@ module.exports = function(Promise, INTERNAL) {
};

Promise.prototype.timeout = function Promise$timeout(ms, message) {
if ((ms | 0) !== ms || ms < 0) {
return apiRejection("expecting a positive integer");
}
ms = +ms;

var ret = new Promise(INTERNAL);
ret._setTrace(this.timeout, this);
Expand Down
Loading

0 comments on commit 7104fd2

Please sign in to comment.