v8/test
caitpotter88 7459d8cecb [promise] Make Promise.all match spec, and always respect [[AlreadyResolved]]
Testing the promise status is not enough to ensure that resolve functions are
called only once.

This change adds a similar version of the [[AlreadyResolved]] slot to the
Promise.all resolve element function, and also ensures that [[AlreadyResolved]]
is respected in the Promise executor, and when resolving thenables. This means
replacing PromiseReject() shortcuts with promiseCapability.reject(), which has
an [[AlreadyResolved]] record in a context slot.

Also ensures that changes to the list accumulator in Promise.all() is not observable
via accessors installed in the Array prototype chain, using the same mechanism used
in several Array methods.

Fixes the following Test262 tests:
- built-ins/Promise/all/call-resolve-element-items.js
- built-ins/Promise/all/call-resolve-element.js
- built-ins/Promise/all/call-resolve-element-after-return.js
- built-ins/Promise/all/same-reject-function.js
- built-ins/Promise/all/resolve-from-same-thenable.js
- built-ins/Promise/all/resolve-before-loop-exit.js
- built-ins/Promise/all/resolve-before-loop-exit-from-same.js
- built-ins/Promise/exception-after-resolve-in-executor.js
- built-ins/Promise/exception-after-resolve-in-thenable-job.js
- built-ins/Promise/all/does-not-invoke-array-setters.js

BUG=v8:4633
LOG=N
R=littledan@chromium.org, cbruni@chromium.org

Review URL: https://codereview.chromium.org/1534813005

Cr-Commit-Position: refs/heads/master@{#33163}
2016-01-07 20:24:26 +00:00
..
benchmarks
cctest [wasm] Fix simple graph building tests by enabling all optional operators. 2016-01-07 16:59:14 +00:00
intl Enable some passing, disabled Intl tests 2015-12-12 01:33:52 +00:00
js-perf-test Remove always-on --harmony-rest-parameters flag 2015-12-12 00:00:38 +00:00
memory
message Revert of Ship ES2015 sloppy-mode function hoisting, let, class (patchset #7 id:120001 of https://codereview.chromium.org/1551443002/ ) 2016-01-07 20:23:21 +00:00
mjsunit Revert of Ship ES2015 sloppy-mode function hoisting, let, class (patchset #7 id:120001 of https://codereview.chromium.org/1551443002/ ) 2016-01-07 20:23:21 +00:00
mozilla Revert of Ship ES2015 sloppy-mode function hoisting, let, class (patchset #7 id:120001 of https://codereview.chromium.org/1551443002/ ) 2016-01-07 20:23:21 +00:00
preparser
promises-aplus
simdjs
test262 [promise] Make Promise.all match spec, and always respect [[AlreadyResolved]] 2016-01-07 20:24:26 +00:00
unittests Disable more crashing / failing wasm tests. 2016-01-05 23:33:12 +00:00
webkit Revert of Ship ES2015 sloppy-mode function hoisting, let, class (patchset #7 id:120001 of https://codereview.chromium.org/1551443002/ ) 2016-01-07 20:23:21 +00:00
bot_default.gyp
bot_default.isolate
default.gyp
default.isolate
ignition.gyp [test] Add ignition test set. 2016-01-04 17:26:42 +00:00
ignition.isolate [test] Add ignition test set. 2016-01-04 17:26:42 +00:00
optimize_for_size.gyp
optimize_for_size.isolate