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

Issue 2752043002: [promises] Add %WaitForPromise runtime call to allow tests to reliably wait for promises to be fini… (Closed)

Created:
3 years, 9 months ago by titzer
Modified:
3 years, 9 months ago
Reviewers:
ulan, gsathya
CC:
v8-reviews_googlegroups.com, neis
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[testing] Add the notion of a wait count to allow tests to robustly wait on asynchronous tasks. Note that this also modifies mjsunit.js to allow the {failWithMessage} method to be monkey-patched by a test. This is necessary because assertions which fail in a promise's then-clause would normally only throw an exception, which is swallowed by the promise, causing the test to silently pass. Instead, patching this {failWithMessage} functionality allows then clauses to use the full assertion machinery of mjsunit.js. R=ulan@chromium.org, gsathya@chromium.org BUG= Review-Url: https://codereview.chromium.org/2752043002 Cr-Commit-Position: refs/heads/master@{#43875} Committed: https://chromium.googlesource.com/v8/v8/+/3bbd81afbc7383956a7894e4dd791ff88dba4c8a

Patch Set 1 #

Patch Set 2 : Strip it down to %IncrementWaitCount and %DecrementWaitCount #

Total comments: 1

Patch Set 3 : Add ForTesting #

Total comments: 2

Patch Set 4 : Move functions to runtime-test.cc #

Patch Set 5 : Don't touch runtime-promise.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -6 lines) Patch
M src/d8.cc View 1 2 1 chunk +14 lines, -3 lines 0 comments Download
M src/isolate.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M src/runtime/runtime-test.cc View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
A test/mjsunit/basic-promise.js View 1 1 chunk +50 lines, -0 lines 0 comments Download
M test/mjsunit/mjsunit.js View 3 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 39 (22 generated)
titzer
3 years, 9 months ago (2017-03-15 17:52:16 UTC) #1
titzer
On 2017/03/15 17:52:16, titzer wrote: A little more background on this CL: In testing WASM ...
3 years, 9 months ago (2017-03-15 17:55:05 UTC) #4
gsathya
On 2017/03/15 17:55:05, titzer wrote: > On 2017/03/15 17:52:16, titzer wrote: > > A little ...
3 years, 9 months ago (2017-03-16 00:32:16 UTC) #8
titzer
On 2017/03/16 00:32:16, gsathya wrote: > On 2017/03/15 17:55:05, titzer wrote: > > On 2017/03/15 ...
3 years, 9 months ago (2017-03-16 06:29:51 UTC) #9
titzer
On 2017/03/16 06:29:51, titzer wrote: > On 2017/03/16 00:32:16, gsathya wrote: > > On 2017/03/15 ...
3 years, 9 months ago (2017-03-16 11:36:33 UTC) #13
ulan
https://codereview.chromium.org/2752043002/diff/20001/src/d8.cc File src/d8.cc (right): https://codereview.chromium.org/2752043002/diff/20001/src/d8.cc#newcode1583 src/d8.cc:1583: return global_template; How about adding "increment", "decrement" functions to ...
3 years, 9 months ago (2017-03-16 11:50:14 UTC) #14
titzer
On 2017/03/16 11:50:14, ulan wrote: > https://codereview.chromium.org/2752043002/diff/20001/src/d8.cc > File src/d8.cc (right): > > https://codereview.chromium.org/2752043002/diff/20001/src/d8.cc#newcode1583 > ...
3 years, 9 months ago (2017-03-16 11:52:52 UTC) #15
ulan
On 2017/03/16 11:52:52, titzer wrote: > On 2017/03/16 11:50:14, ulan wrote: > > https://codereview.chromium.org/2752043002/diff/20001/src/d8.cc > ...
3 years, 9 months ago (2017-03-16 12:47:34 UTC) #18
titzer
On 2017/03/16 12:47:34, ulan wrote: > On 2017/03/16 11:52:52, titzer wrote: > > On 2017/03/16 ...
3 years, 9 months ago (2017-03-16 12:55:33 UTC) #19
ulan
On 2017/03/16 12:55:33, titzer wrote: > On 2017/03/16 12:47:34, ulan wrote: > > On 2017/03/16 ...
3 years, 9 months ago (2017-03-16 13:27:42 UTC) #20
titzer
On 2017/03/16 13:27:42, ulan wrote: > On 2017/03/16 12:55:33, titzer wrote: > > On 2017/03/16 ...
3 years, 9 months ago (2017-03-16 15:36:16 UTC) #23
gsathya
On 2017/03/16 06:29:51, titzer wrote: > On 2017/03/16 00:32:16, gsathya wrote: > > On 2017/03/15 ...
3 years, 9 months ago (2017-03-16 17:38:53 UTC) #26
gsathya
https://codereview.chromium.org/2752043002/diff/40001/src/d8.cc File src/d8.cc (right): https://codereview.chromium.org/2752043002/diff/40001/src/d8.cc#newcode2600 src/d8.cc:2600: if (reinterpret_cast<i::Isolate*>(isolate)->GetWaitCountForTesting() > 0) { Should we time out ...
3 years, 9 months ago (2017-03-16 17:39:04 UTC) #27
titzer
On 2017/03/16 17:38:53, gsathya wrote: > On 2017/03/16 06:29:51, titzer wrote: > > On 2017/03/16 ...
3 years, 9 months ago (2017-03-16 17:42:26 UTC) #28
gsathya
On 2017/03/16 17:42:26, titzer wrote: > On 2017/03/16 17:38:53, gsathya wrote: > > On 2017/03/16 ...
3 years, 9 months ago (2017-03-16 17:45:23 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2752043002/80001
3 years, 9 months ago (2017-03-16 17:58:05 UTC) #36
commit-bot: I haz the power
3 years, 9 months ago (2017-03-16 18:20:27 UTC) #39
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/v8/v8/+/3bbd81afbc7383956a7894e4dd791ff88db...

Powered by Google App Engine
This is Rietveld 408576698