|
@@ -9403,14 +9403,15 @@ var BABYLON;
|
|
return returnedValue;
|
|
return returnedValue;
|
|
}
|
|
}
|
|
catch (e) {
|
|
catch (e) {
|
|
- this._reject(e);
|
|
|
|
|
|
+ this._reject(e, true);
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
};
|
|
};
|
|
- InternalPromise.prototype._reject = function (reason) {
|
|
|
|
|
|
+ InternalPromise.prototype._reject = function (reason, onLocalThrow) {
|
|
|
|
+ if (onLocalThrow === void 0) { onLocalThrow = false; }
|
|
this._state = PromiseStates.Rejected;
|
|
this._state = PromiseStates.Rejected;
|
|
this._reason = reason;
|
|
this._reason = reason;
|
|
- if (this._onRejected) {
|
|
|
|
|
|
+ if (this._onRejected && !onLocalThrow) {
|
|
try {
|
|
try {
|
|
this._onRejected(reason);
|
|
this._onRejected(reason);
|
|
this._rejectWasConsumed = true;
|
|
this._rejectWasConsumed = true;
|