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