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

Issue 2648873002: [inspector] added creation frame for async call chains for promises (Closed)

Created:
3 years, 11 months ago by kozy
Modified:
3 years, 11 months ago
Reviewers:
dgozman, Yang, gsathya
CC:
v8-reviews_googlegroups.com, devtools-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[inspector] added creation frame for async call chains for promises With creation frame we can show additional information with description of each async stack trace, which could help user to understand where promises were chained. At least in case of Promise.resolve().then(foo1).then(foo2) we would be able to show following stack trace for break in foo2 callback: foo2 (test.js:14:2) -- Promise.resolve (test.js:29:14)-- -- Promise.resolve (test.js:28:14)-- promiseThen (test.js:30:2) More details: https://docs.google.com/document/d/1u19N45f1gSF7M39mGsycJEK3IPyJgIXCBnWyiPeuJFE BUG=v8:5738 R=dgozman@chromium.org,gsathya@chromium.org Review-Url: https://codereview.chromium.org/2648873002 Cr-Commit-Position: refs/heads/master@{#42682} Committed: https://chromium.googlesource.com/v8/v8/+/b98dd0af92656df4889350e63081552aced61ad7

Patch Set 1 #

Total comments: 2

Patch Set 2 : addressed comments #

Patch Set 3 : fixed usage of external reference #

Total comments: 18

Patch Set 4 : rebased #

Patch Set 5 : removed redundant async call chains #

Total comments: 1

Patch Set 6 : merge async call chains onle when they have the same description #

Total comments: 14

Patch Set 7 : addressed comments #

Patch Set 8 : little fix for test #

Patch Set 9 : add test for setTimeout #

Unified diffs Side-by-side diffs Delta from patch set Stats (+467 lines, -102 lines) Patch
M src/inspector/js_protocol.json View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M src/inspector/v8-debugger.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M src/inspector/v8-debugger.cc View 1 2 3 4 5 6 5 chunks +30 lines, -7 lines 0 comments Download
M src/inspector/v8-stack-trace-impl.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M src/inspector/v8-stack-trace-impl.cc View 1 2 3 4 5 6 4 chunks +26 lines, -4 lines 0 comments Download
M test/inspector/debugger/async-stack-await.js View 1 2 3 4 5 6 1 chunk +1 line, -6 lines 0 comments Download
M test/inspector/debugger/async-stack-await-expected.txt View 1 2 3 1 chunk +7 lines, -6 lines 0 comments Download
A test/inspector/debugger/async-stack-created-frame.js View 1 2 3 4 5 6 7 8 1 chunk +178 lines, -0 lines 0 comments Download
A test/inspector/debugger/async-stack-created-frame-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +100 lines, -0 lines 0 comments Download
M test/inspector/debugger/async-stack-for-promise.js View 1 2 3 4 5 6 1 chunk +1 line, -6 lines 0 comments Download
M test/inspector/debugger/async-stack-for-promise-expected.txt View 1 2 3 4 5 3 chunks +49 lines, -30 lines 0 comments Download
M test/inspector/debugger/async-stacks-limit.js View 1 2 3 4 5 6 7 4 chunks +34 lines, -26 lines 0 comments Download
M test/inspector/debugger/async-stacks-limit-expected.txt View 1 2 3 4 5 6 7 5 chunks +19 lines, -16 lines 0 comments Download
M test/inspector/protocol-test.js View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 35 (23 generated)
kozy
Dmitry, please take a look on inspector part. Sathya, please take a look on promise ...
3 years, 11 months ago (2017-01-22 22:58:40 UTC) #5
gsathya
On 2017/01/22 22:58:40, kozyatinskiy wrote: > Dmitry, please take a look on inspector part. > ...
3 years, 11 months ago (2017-01-23 07:42:09 UTC) #6
Yang
https://codereview.chromium.org/2648873002/diff/40001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2648873002/diff/40001/src/builtins/builtins-promise.cc#newcode45 src/builtins/builtins-promise.cc:45: GotoUnless(Word32Or(IsPromiseHookEnabled(), IsDebugActive()), &out); If this becomes a performance bottleneck, ...
3 years, 11 months ago (2017-01-23 14:49:22 UTC) #8
Yang
On 2017/01/23 14:49:22, Yang wrote: > https://codereview.chromium.org/2648873002/diff/40001/src/builtins/builtins-promise.cc > File src/builtins/builtins-promise.cc (right): > > https://codereview.chromium.org/2648873002/diff/40001/src/builtins/builtins-promise.cc#newcode45 > ...
3 years, 11 months ago (2017-01-23 14:49:41 UTC) #9
kozy
all done. Dmitry, please take a look! https://codereview.chromium.org/2648873002/diff/40001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2648873002/diff/40001/src/builtins/builtins-promise.cc#newcode45 src/builtins/builtins-promise.cc:45: GotoUnless(Word32Or(IsPromiseHookEnabled(), IsDebugActive()), ...
3 years, 11 months ago (2017-01-23 22:29:01 UTC) #11
dgozman
https://codereview.chromium.org/2648873002/diff/100001/src/inspector/js_protocol.json File src/inspector/js_protocol.json (right): https://codereview.chromium.org/2648873002/diff/100001/src/inspector/js_protocol.json#newcode205 src/inspector/js_protocol.json:205: { "name": "creationFrame", "$ref": "CallFrame", "optional": true, "experimental": true, ...
3 years, 11 months ago (2017-01-24 01:02:41 UTC) #20
kozy
Rebased, Dmitry pease take a look! https://codereview.chromium.org/2648873002/diff/100001/src/inspector/js_protocol.json File src/inspector/js_protocol.json (right): https://codereview.chromium.org/2648873002/diff/100001/src/inspector/js_protocol.json#newcode205 src/inspector/js_protocol.json:205: { "name": "creationFrame", ...
3 years, 11 months ago (2017-01-24 21:43:39 UTC) #22
kozy
Dmitry, please take another look.
3 years, 11 months ago (2017-01-24 22:53:55 UTC) #23
dgozman
lgtm https://codereview.chromium.org/2648873002/diff/140001/src/inspector/v8-stack-trace-impl.h File src/inspector/v8-stack-trace-impl.h (right): https://codereview.chromium.org/2648873002/diff/140001/src/inspector/v8-stack-trace-impl.h#newcode84 src/inspector/v8-stack-trace-impl.h:84: void setCreation(std::unique_ptr<V8StackTraceImpl> creation) { setPromiseCreationStack https://codereview.chromium.org/2648873002/diff/160001/src/inspector/v8-debugger.cc File src/inspector/v8-debugger.cc ...
3 years, 11 months ago (2017-01-24 23:57:44 UTC) #24
kozy
thank you!, all done. https://codereview.chromium.org/2648873002/diff/160001/src/inspector/v8-debugger.cc File src/inspector/v8-debugger.cc (right): https://codereview.chromium.org/2648873002/diff/160001/src/inspector/v8-debugger.cc#newcode879 src/inspector/v8-debugger.cc:879: std::unique_ptr<V8StackTraceImpl> chain = On 2017/01/24 ...
3 years, 11 months ago (2017-01-25 00:45:43 UTC) #25
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/2648873002/220001
3 years, 11 months ago (2017-01-26 08:56:07 UTC) #32
commit-bot: I haz the power
3 years, 11 months ago (2017-01-26 09:32:44 UTC) #35
Message was sent while issue was closed.
Committed patchset #9 (id:220001) as
https://chromium.googlesource.com/v8/v8/+/b98dd0af92656df4889350e63081552aced...

Powered by Google App Engine
This is Rietveld 408576698