Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Issue 1531073004: [promise] Make Promise.reject match spec, and validate promise capabilities (Closed)

Created:
5 years ago by caitp (gmail)
Modified:
4 years, 11 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[promise] Make Promise.reject match spec, and validate promise capabilities 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 Committed: https://crrev.com/e4af5cdbf9ae081c6b69261ea7d7addf95e1e524 Cr-Commit-Position: refs/heads/master@{#33128}

Patch Set 1 : #

Patch Set 2 : Minor adjustments + test262 status fixes #

Patch Set 3 : Delete invalid test + add ignition skips #

Patch Set 4 : Re-add and skip test #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -28 lines) Patch
M src/js/promise.js View 1 3 chunks +24 lines, -12 lines 3 comments Download
M src/messages.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M test/test262/test262.status View 1 2 4 chunks +2 lines, -16 lines 0 comments Download

Messages

Total messages: 34 (15 generated)
caitp (gmail)
another quick fix --- there's some unnecessary test/throwing in NewPromiseCapabilities, but I think they're not ...
5 years ago (2015-12-18 15:56:30 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1531073004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1531073004/20001
4 years, 11 months ago (2016-01-04 02:37:09 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/11907) v8_linux_arm_rel on ...
4 years, 11 months ago (2016-01-04 02:37:59 UTC) #6
caitp (gmail)
I think the debugger test is just invalid, because the assertions within it depend on ...
4 years, 11 months ago (2016-01-05 18:08:47 UTC) #11
caitp (gmail)
On 2016/01/05 18:08:47, caitp wrote: > I think the debugger test is just invalid, because ...
4 years, 11 months ago (2016-01-05 18:59:25 UTC) #12
Dan Ehrenberg
On 2016/01/05 at 18:59:25, caitpotter88 wrote: > On 2016/01/05 18:08:47, caitp wrote: > > I ...
4 years, 11 months ago (2016-01-05 19:10:35 UTC) #13
caitp (gmail)
On 2016/01/05 19:10:35, Dan Ehrenberg wrote: > On 2016/01/05 at 18:59:25, caitpotter88 wrote: > > ...
4 years, 11 months ago (2016-01-05 19:13:40 UTC) #14
Dan Ehrenberg
On 2016/01/05 at 19:13:40, caitpotter88 wrote: > On 2016/01/05 19:10:35, Dan Ehrenberg wrote: > > ...
4 years, 11 months ago (2016-01-05 19:31:22 UTC) #17
Dan Ehrenberg
lgtm
4 years, 11 months ago (2016-01-05 19:31:27 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1531073004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1531073004/80001
4 years, 11 months ago (2016-01-05 19:31:41 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/9460)
4 years, 11 months ago (2016-01-05 19:37:24 UTC) #22
Dan Ehrenberg
Adam, could you do an OWNERS review?
4 years, 11 months ago (2016-01-05 19:45:01 UTC) #24
adamk
lgtm besides one nit https://codereview.chromium.org/1531073004/diff/80001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/1531073004/diff/80001/src/js/promise.js#newcode269 src/js/promise.js:269: %_Call(promiseCapability.reject, UNDEFINED, r); Any reason ...
4 years, 11 months ago (2016-01-05 20:33:10 UTC) #25
caitp (gmail)
https://codereview.chromium.org/1531073004/diff/80001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/1531073004/diff/80001/src/js/promise.js#newcode269 src/js/promise.js:269: %_Call(promiseCapability.reject, UNDEFINED, r); On 2016/01/05 20:33:09, adamk wrote: > ...
4 years, 11 months ago (2016-01-05 20:39:54 UTC) #26
adamk
https://codereview.chromium.org/1531073004/diff/80001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/1531073004/diff/80001/src/js/promise.js#newcode269 src/js/promise.js:269: %_Call(promiseCapability.reject, UNDEFINED, r); On 2016/01/05 20:39:54, caitp wrote: > ...
4 years, 11 months ago (2016-01-05 20:44:41 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1531073004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1531073004/80001
4 years, 11 months ago (2016-01-05 20:51:22 UTC) #29
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 11 months ago (2016-01-05 22:18:37 UTC) #31
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/e4af5cdbf9ae081c6b69261ea7d7addf95e1e524 Cr-Commit-Position: refs/heads/master@{#33128}
4 years, 11 months ago (2016-01-05 22:19:48 UTC) #33
Dan Ehrenberg
4 years, 11 months ago (2016-01-11 22:43:52 UTC) #34
Message was sent while issue was closed.
On 2016/01/05 at 22:19:48, commit-bot wrote:
> Patchset 4 (id:??) landed as
https://crrev.com/e4af5cdbf9ae081c6b69261ea7d7addf95e1e524
> Cr-Commit-Position: refs/heads/master@{#33128}

A partial rollback of this patch was done at
https://codereview.chromium.org/1578893002/

Powered by Google App Engine
This is Rietveld 408576698