Download to Bluebird 3.3.4 to fix translation error

browserTest.js -> "should save book with child note to current
collection" was failing with an attempt to translate as COinS instead of
RIS. If this isn't fixed in a subsequent Bluebird release, we can debug
further.
This commit is contained in:
Dan Stillman 2016-04-27 14:34:13 -04:00
parent bb522868ad
commit 5a4dddcbc6

View file

@ -23,7 +23,7 @@
*
*/
/**
* bluebird build version 3.3.5
* bluebird build version 3.3.4
* Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
*/
!function(e){
@ -137,7 +137,6 @@ var Queue = _dereq_("./queue");
var util = _dereq_("./util");
function Async() {
this._customScheduler = false;
this._isTickUsed = false;
this._lateQueue = new Queue(16);
this._normalQueue = new Queue(16);
@ -150,17 +149,6 @@ function Async() {
this._schedule = schedule;
}
Async.prototype.setScheduler = function(fn) {
var prev = this._schedule;
this._schedule = fn;
this._customScheduler = true;
return prev;
};
Async.prototype.hasCustomScheduler = function() {
return this._customScheduler;
};
Async.prototype.enableTrampoline = function() {
this._trampolineEnabled = true;
};
@ -1139,7 +1127,8 @@ function checkForgottenReturns(returnValue, promiseCreated, name, promise,
if (returnValue === undefined && promiseCreated !== null &&
wForgottenReturn) {
if (parent !== undefined && parent._returnedNonUndefined()) return;
if ((promise._bitField & 65535) === 0) return;
var bitField = promise._bitField;
if ((bitField & 65535) === 0) return;
if (name) name = name + " ";
var msg = "a promise was created in a " + name +
@ -2041,18 +2030,9 @@ function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
}
function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
if (debug.cancellation()) {
var internal = new Promise(INTERNAL);
var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);
this._promise = internal.lastly(function() {
return _finallyPromise;
});
internal._captureStackTrace();
internal._setOnCancel(this);
} else {
var promise = this._promise = new Promise(INTERNAL);
promise._captureStackTrace();
}
var promise = this._promise = new Promise(INTERNAL);
promise._captureStackTrace();
promise._setOnCancel(this);
this._stack = stack;
this._generatorFunction = generatorFunction;
this._receiver = receiver;
@ -2061,7 +2041,6 @@ function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
? [yieldHandler].concat(yieldHandlers)
: yieldHandlers;
this._yieldedPromise = null;
this._cancellationPhase = false;
}
util.inherits(PromiseSpawn, Proxyable);
@ -2071,10 +2050,6 @@ PromiseSpawn.prototype._isResolved = function() {
PromiseSpawn.prototype._cleanup = function() {
this._promise = this._generator = null;
if (debug.cancellation() && this._finallyPromise !== null) {
this._finallyPromise._fulfill();
this._finallyPromise = null;
}
};
PromiseSpawn.prototype._promiseCancelled = function() {
@ -2091,15 +2066,22 @@ PromiseSpawn.prototype._promiseCancelled = function() {
result = tryCatch(this._generator["throw"]).call(this._generator,
reason);
this._promise._popContext();
if (result === errorObj && result.e === reason) {
result = null;
}
} else {
this._promise._pushContext();
result = tryCatch(this._generator["return"]).call(this._generator,
undefined);
this._promise._popContext();
}
this._cancellationPhase = true;
this._yieldedPromise = null;
this._continue(result);
var promise = this._promise;
this._cleanup();
if (result === errorObj) {
promise._rejectCallback(result.e, false);
} else {
promise.cancel();
}
};
PromiseSpawn.prototype._promiseFulfilled = function(value) {
@ -2124,6 +2106,7 @@ PromiseSpawn.prototype._resultCancelled = function() {
if (this._yieldedPromise instanceof Promise) {
var promise = this._yieldedPromise;
this._yieldedPromise = null;
this._promiseCancelled();
promise.cancel();
}
};
@ -2143,21 +2126,13 @@ PromiseSpawn.prototype._continue = function (result) {
var promise = this._promise;
if (result === errorObj) {
this._cleanup();
if (this._cancellationPhase) {
return promise.cancel();
} else {
return promise._rejectCallback(result.e, false);
}
return promise._rejectCallback(result.e, false);
}
var value = result.value;
if (result.done === true) {
this._cleanup();
if (this._cancellationPhase) {
return promise.cancel();
} else {
return promise._resolveCallback(value);
}
return promise._resolveCallback(value);
} else {
var maybePromise = tryConvertToPromise(value, this._promise);
if (!(maybePromise instanceof Promise)) {
@ -2915,7 +2890,9 @@ Promise.setScheduler = function(fn) {
if (typeof fn !== "function") {
throw new TypeError("expecting a function but got " + util.classString(fn));
}
return async.setScheduler(fn);
var prev = async._schedule;
async._schedule = fn;
return prev;
};
Promise.prototype._then = function (
@ -3024,7 +3001,6 @@ Promise.prototype._setCancelled = function() {
};
Promise.prototype._setAsyncGuaranteed = function() {
if (async.hasCustomScheduler()) return;
this._bitField = this._bitField | 134217728;
};
@ -3430,20 +3406,20 @@ _dereq_("./join")(
Promise, PromiseArray, tryConvertToPromise, INTERNAL, debug);
Promise.Promise = Promise;
_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
_dereq_('./call_get.js')(Promise);
_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);
_dereq_('./timers.js')(Promise, INTERNAL, debug);
_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);
_dereq_('./nodeify.js')(Promise);
_dereq_('./promisify.js')(Promise, INTERNAL);
_dereq_('./call_get.js')(Promise);
_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
_dereq_('./settle.js')(Promise, PromiseArray, debug);
_dereq_('./some.js')(Promise, PromiseArray, apiRejection);
_dereq_('./filter.js')(Promise, INTERNAL);
_dereq_('./each.js')(Promise, INTERNAL);
_dereq_('./promisify.js')(Promise, INTERNAL);
_dereq_('./any.js')(Promise);
_dereq_('./each.js')(Promise, INTERNAL);
_dereq_('./filter.js')(Promise, INTERNAL);
util.toFastProperties(Promise);
util.toFastProperties(Promise.prototype);
@ -4405,18 +4381,12 @@ var schedule;
var noAsyncScheduler = function() {
throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
};
var NativePromise = util.getNativePromise();
if (util.isNode && typeof MutationObserver === "undefined") {
var GlobalSetImmediate = global.setImmediate;
var ProcessNextTick = process.nextTick;
schedule = util.isRecentNode
? function(fn) { GlobalSetImmediate.call(global, fn); }
: function(fn) { ProcessNextTick.call(process, fn); };
} else if (typeof NativePromise === "function") {
var nativePromise = NativePromise.resolve();
schedule = function(fn) {
nativePromise.then(fn);
};
} else if ((typeof MutationObserver !== "undefined") &&
!(typeof window !== "undefined" &&
window.navigator &&
@ -4428,23 +4398,23 @@ if (util.isNode && typeof MutationObserver === "undefined") {
var div2 = document.createElement("div");
var o2 = new MutationObserver(function() {
div.classList.toggle("foo");
toggleScheduled = false;
toggleScheduled = false;
});
o2.observe(div2, opts);
var scheduleToggle = function() {
if (toggleScheduled) return;
toggleScheduled = true;
div2.classList.toggle("foo");
};
toggleScheduled = true;
div2.classList.toggle("foo");
};
return function schedule(fn) {
var o = new MutationObserver(function() {
o.disconnect();
fn();
});
o.observe(div, opts);
scheduleToggle();
return function schedule(fn) {
var o = new MutationObserver(function() {
o.disconnect();
fn();
});
o.observe(div, opts);
scheduleToggle();
};
})();
} else if (typeof setImmediate !== "undefined") {
@ -5475,17 +5445,6 @@ function env(key, def) {
return isNode ? process.env[key] : def;
}
function getNativePromise() {
if (typeof Promise === "function") {
try {
var promise = new Promise(function(){});
if ({}.toString.call(promise) === "[object Promise]") {
return Promise;
}
} catch (e) {}
}
}
var ret = {
isClass: isClass,
isIdentifier: isIdentifier,
@ -5517,8 +5476,7 @@ var ret = {
typeof chrome.loadTimes === "function",
isNode: isNode,
env: env,
global: globalObject,
getNativePromise: getNativePromise
global: globalObject
};
ret.isRecentNode = ret.isNode && (function() {
var version = process.versions.node.split(".").map(Number);