-
caitpotter88 authored
Correctly validate promise capabilities in NewPromiseCapabilities() and in GetCapabilitiesExtractor(). Also explicitly follows Promise.race step 2 and similar cases in the spec, rather than passing tests asserting these steps are taken in NewPromiseCapability Also changes Promise.reject to match specification. Fixes the following test262 tests: - built-ins/Promise/all/capability-executor-called-twice.js - built-ins/Promise/all/capability-executor-not-callable.js - built-ins/Promise/prototype/then/capability-executor-called-twice.js - built-ins/Promise/prototype/then/capability-executor-not-callable.js - built-ins/Promise/reject/capability-executor-called-twice.js - built-ins/Promise/reject/capability-executor-not-callable.js - built-ins/Promise/resolve/capability-executor-called-twice.js - built-ins/Promise/resolve/capability-executor-not-callable.js - built-ins/Promise/race/capability-executor-called-twice.js - built-ins/Promise/race/capability-executor-not-callable.js - built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js - built-ins/Promise/race/S25.4.4.3_A3.1_T2.js Per v8:3641, mjsunit/es6/debug-promises/throw-with-undefined-reject.js becomes invalid. The exception is thrown before the chain handler is ever invoked, and is caught externally by d8's own handler --- thus evading the uncaught exception event. BUG=v8:4633, v8:4631, v8:4243, v8:3641 LOG=N R=littledan@chromium.org, cbruni@chromium.org Review URL: https://codereview.chromium.org/1531073004 Cr-Commit-Position: refs/heads/master@{#33128}
e4af5cdb