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

Issue 2575313002: [promisehook] Implement PromiseHook (Closed)

Created:
4 years ago by gsathya
Modified:
4 years ago
CC:
ofrobots, v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[promisehook] Implement PromiseHook This adds kInit, kResolve, kBefore and kAfter lifecycle hooks to promises. This also exposes an API to set the PromiseHook. BUG=v8:4643 Review-Url: https://codereview.chromium.org/2575313002 Cr-Commit-Position: refs/heads/master@{#41775} Committed: https://chromium.googlesource.com/v8/v8/+/b1c148b91f84d5825c9a52688e71b08fe2be2958

Patch Set 1 #

Patch Set 2 : add tests #

Total comments: 8

Patch Set 3 : remove promise_hook_enabled_ #

Total comments: 8

Patch Set 4 : reorder var #

Patch Set 5 : fix #

Patch Set 6 : move resolve hook #

Total comments: 4

Patch Set 7 : reorder #

Total comments: 4

Patch Set 8 : rebase + add comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+456 lines, -61 lines) Patch
M include/v8.h View 1 2 3 4 5 6 7 2 chunks +27 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M src/assembler.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/assembler.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/builtins/builtins.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/builtins/builtins-promise.cc View 1 2 3 4 5 6 7 9 chunks +46 lines, -9 lines 0 comments Download
M src/code-stub-assembler.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -5 lines 0 comments Download
M src/external-reference-table.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M src/isolate.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -8 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -3 lines 0 comments Download
M src/js/async-await.js View 1 chunk +1 line, -1 line 0 comments Download
M src/js/promise.js View 1 2 3 4 5 6 7 4 chunks +5 lines, -5 lines 0 comments Download
M src/promise-utils.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/promise-utils.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -1 line 0 comments Download
M src/runtime/runtime-promise.cc View 1 2 3 4 5 2 chunks +39 lines, -0 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 6 7 5 chunks +12 lines, -15 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 1 chunk +284 lines, -0 lines 0 comments Download
M test/cctest/test-code-stub-assembler.cc View 1 2 2 chunks +5 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 50 (34 generated)
gsathya
Still adding more tests, but PTAL.
4 years ago (2016-12-15 04:47:47 UTC) #9
adamk
Deferring to Dan in the semantics. https://codereview.chromium.org/2575313002/diff/20001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2575313002/diff/20001/src/builtins/builtins-promise.cc#newcode27 src/builtins/builtins-promise.cc:27: Handle<JSObject> promise = ...
4 years ago (2016-12-15 08:46:09 UTC) #12
gsathya
https://codereview.chromium.org/2575313002/diff/20001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2575313002/diff/20001/src/builtins/builtins-promise.cc#newcode27 src/builtins/builtins-promise.cc:27: Handle<JSObject> promise = handle(PromiseUtils::GetPromise(context), isolate); On 2016/12/15 08:46:09, adamk ...
4 years ago (2016-12-15 15:35:33 UTC) #15
adamk
https://codereview.chromium.org/2575313002/diff/20001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2575313002/diff/20001/src/isolate.cc#newcode3172 src/isolate.cc:3172: is_promise_hook_enabled_ = hook != nullptr; On 2016/12/15 15:35:33, gsathya ...
4 years ago (2016-12-15 15:43:58 UTC) #18
gsathya
https://codereview.chromium.org/2575313002/diff/40001/src/code-stub-assembler.cc File src/code-stub-assembler.cc (right): https://codereview.chromium.org/2575313002/diff/40001/src/code-stub-assembler.cc#newcode8246 src/code-stub-assembler.cc:8246: MachineType::Uint8(), On 2016/12/15 15:43:58, adamk wrote: > Probably this ...
4 years ago (2016-12-15 16:32:07 UTC) #21
Dan Ehrenberg
This looks really good. It's pretty amazing how small this patch is. https://codereview.chromium.org/2575313002/diff/100001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc ...
4 years ago (2016-12-15 22:21:48 UTC) #28
gsathya
Thanks! Added tests. PTAL. https://codereview.chromium.org/2575313002/diff/100001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2575313002/diff/100001/src/builtins/builtins-promise.cc#newcode961 src/builtins/builtins-promise.cc:961: a.Goto(&debug_push); On 2016/12/15 22:21:48, Dan ...
4 years ago (2016-12-16 00:55:16 UTC) #29
Dan Ehrenberg
lgtm I appreciate the extra tests.
4 years ago (2016-12-16 01:02:41 UTC) #30
adamk
lgtm +jochen for API
4 years ago (2016-12-16 08:53:48 UTC) #32
jochen (gone - plz use gerrit)
lgtm with nits https://codereview.chromium.org/2575313002/diff/120001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/2575313002/diff/120001/include/v8.h#newcode5759 include/v8.h:5759: enum class PromiseHookType { kInit, kResolve, ...
4 years ago (2016-12-16 09:36:41 UTC) #33
gsathya
thanks for the reviews! https://codereview.chromium.org/2575313002/diff/120001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/2575313002/diff/120001/include/v8.h#newcode5759 include/v8.h:5759: enum class PromiseHookType { kInit, ...
4 years ago (2016-12-16 18:04:25 UTC) #36
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/2575313002/140001
4 years ago (2016-12-16 18:42:06 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/30855)
4 years ago (2016-12-16 18:45:56 UTC) #43
bradnelson
lgtm for formatting changes in wasm.
4 years ago (2016-12-16 19:02:41 UTC) #45
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/2575313002/140001
4 years ago (2016-12-16 19:15:39 UTC) #47
commit-bot: I haz the power
4 years ago (2016-12-16 19:17:25 UTC) #50
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/v8/v8/+/b1c148b91f84d5825c9a52688e71b08fe2b...

Powered by Google App Engine
This is Rietveld 408576698