diff options
author | FallenRiteMonk <fallenritemonk@gmail.com> | 2018-04-05 11:52:34 -0400 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-04-05 16:01:07 -0400 |
commit | 25a816dcda7b1db0929501acfe13f2fe5119759b (patch) | |
tree | d3df4377a11dfb643b5976d2048d9bb4ee527903 /deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js | |
parent | b29c36b80746733994257b7380245102bc3c4cd6 (diff) | |
download | android-node-v8-25a816dcda7b1db0929501acfe13f2fe5119759b.tar.gz android-node-v8-25a816dcda7b1db0929501acfe13f2fe5119759b.tar.bz2 android-node-v8-25a816dcda7b1db0929501acfe13f2fe5119759b.zip |
deps: upgrade npm to 5.8.0
PR-URL: https://github.com/nodejs/node/pull/19560
Fixes: https://github.com/nodejs/node/issues/19271
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js')
1 files changed, 7 insertions, 12 deletions
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js index 038140d8d8..925776f55f 100644 --- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js +++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js @@ -10,7 +10,7 @@ import { import originalThen from './then'; import originalResolve from './promise/resolve'; -export const PROMISE_ID = Math.random().toString(36).substring(16); +export const PROMISE_ID = Math.random().toString(36).substring(2); function noop() {} @@ -18,7 +18,7 @@ const PENDING = void 0; const FULFILLED = 1; const REJECTED = 2; -const GET_THEN_ERROR = new ErrorObject(); +const TRY_CATCH_ERROR = { error: null }; function selfFulfillment() { return new TypeError("You cannot resolve a promise with itself"); @@ -32,8 +32,8 @@ function getThen(promise) { try { return promise.then; } catch(error) { - GET_THEN_ERROR.error = error; - return GET_THEN_ERROR; + TRY_CATCH_ERROR.error = error; + return TRY_CATCH_ERROR; } } @@ -87,9 +87,9 @@ function handleMaybeThenable(promise, maybeThenable, then) { maybeThenable.constructor.resolve === originalResolve) { handleOwnThenable(promise, maybeThenable); } else { - if (then === GET_THEN_ERROR) { - reject(promise, GET_THEN_ERROR.error); - GET_THEN_ERROR.error = null; + if (then === TRY_CATCH_ERROR) { + reject(promise, TRY_CATCH_ERROR.error); + TRY_CATCH_ERROR.error = null; } else if (then === undefined) { fulfill(promise, maybeThenable); } else if (isFunction(then)) { @@ -174,11 +174,6 @@ function publish(promise) { promise._subscribers.length = 0; } -function ErrorObject() { - this.error = null; -} - -const TRY_CATCH_ERROR = new ErrorObject(); function tryCatch(callback, detail) { try { |