24ff30b740
Several changes are included here: 1. Each resolution callback references shared data indicating whether it has already been resolved or not, as described in 25.4.1.3 http://tc39.github.io/ecma262/#sec-createresolvingfunctions. Previously this was handled exclusively by the Promise's status, which does not work correctly with the current chaining behaviour. 2. During fulfillment, When a Promise is resolved with a thenable, the spec chains the promises together by invoking the thenable's `then` function with the original Promise's resolve and reject methods (per section 25.4.2.2, or http://tc39.github.io/ecma262/#sec-promiseresolvethenablejob, on the next tick, regardless of whether or not there are pending tasks. 3. Adds a spec compliance fix to ensure that the Promise constructor is only loaded once when `then()` is called, solving v8:4539 as well. This involves refactoring PromiseChain to accept a constructor argument. PromiseChain/PromiseDeferred will hopefully be removed soon, simplifying the process. BUG=v8:4162, v8:4539, v8:3237 LOG=N R=rossberg@chromium.org, littledan@chromium.org, adamk@chromium.org Review URL: https://codereview.chromium.org/1394463003 Cr-Commit-Position: refs/heads/master@{#32046} |
||
---|---|---|
.. | ||
array-iterator.js | ||
array.js | ||
arraybuffer.js | ||
code-stubs.js | ||
collection-iterator.js | ||
collection.js | ||
date.js | ||
generator.js | ||
harmony-array-includes.js | ||
harmony-atomics.js | ||
harmony-object-observe.js | ||
harmony-reflect.js | ||
harmony-regexp.js | ||
harmony-sharedarraybuffer.js | ||
harmony-simd.js | ||
i18n.js | ||
iterator-prototype.js | ||
json.js | ||
macros.py | ||
math.js | ||
messages.js | ||
object-observe.js | ||
prologue.js | ||
promise.js | ||
proxy.js | ||
regexp.js | ||
runtime.js | ||
spread.js | ||
string-iterator.js | ||
string.js | ||
symbol.js | ||
templates.js | ||
typedarray.js | ||
uri.js | ||
v8natives.js | ||
weak-collection.js |