d6c01059a5
The V8 Inspector was sending an additional frame as part of async stack traces for async functions, which pointed to the first executed `await` in the async function. This is leaking an implementation detail of how (and more precisely when) the inspector decides to collect this stack trace. From the users perspective the async part of the stack trace is supposed to capture what happened _prior to the task_ - meaning in case of async functions: What lead to the execution of the async function. This is reflected by the fact that the DevTools front-end (and the V8 Inspector itself) performs post-processing on these async call stacks, removing the misleading top frame from it. But this post-processing is not applied consistently to all async stack traces (i.e. the Console message stack traces don't get this), and potentially also not applied consistently across consumers of the Chromium debugger backend. Instead the V8 Inspector now removes the top frame itself and thus reports `await` consistently with how other async tasks are reported to debugger front-ends. Note: This preserves backwards compatibility with old versions of devtools-frontend, which do post-processing (for the Call Stack) only on async stack traces marked with "async function", while we now mark these async stack traces with "await" instead (aligned with what the front-end is using as user visibile string anyways in the Call Stack section, and this matching will be updated in a separate follow up CL to look for "await" instead of "async function"). Before: https://imgur.com/kIrWcIc.png After: https://imgur.com/HvZGqiP Fixed: chromium:1254259 Bug: chromium:1229662 Change-Id: I57ce051a28892177b6b96221f083ae957f967e52 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3193535 Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#77157}
179 lines
4.0 KiB
Plaintext
179 lines
4.0 KiB
Plaintext
stepOut async function
|
|
|
|
Running test: testTrivial
|
|
Check that we have proper async stack at return
|
|
bar (testTrivial.js:28:8)
|
|
-- await --
|
|
foo (testTrivial.js:23:14)
|
|
-- await --
|
|
test (testTrivial.js:18:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
foo (testTrivial.js:24:6)
|
|
-- await --
|
|
test (testTrivial.js:18:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
test (testTrivial.js:19:6)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
|
|
Running test: testStepOutPrecision
|
|
Check that stepOut go to resumed outer generator
|
|
bar (testStepOutPrecision.js:61:8)
|
|
-- await --
|
|
foo (testStepOutPrecision.js:55:14)
|
|
-- await --
|
|
test (testStepOutPrecision.js:48:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
foo (testStepOutPrecision.js:56:8)
|
|
-- await --
|
|
test (testStepOutPrecision.js:48:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
test (testStepOutPrecision.js:49:8)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
floodWithTimeouts (testStepOutPrecision.js:40:15)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepOutPrecision.js:41:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepOutPrecision.js:41:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepOutPrecision.js:41:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepOutPrecision.js:41:10)
|
|
test (testStepOutPrecision.js:46:8)
|
|
(anonymous) (:0:0)
|
|
|
|
test (testStepOutPrecision.js:50:8)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
floodWithTimeouts (testStepOutPrecision.js:40:15)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepOutPrecision.js:41:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepOutPrecision.js:41:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepOutPrecision.js:41:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepOutPrecision.js:41:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepOutPrecision.js:41:10)
|
|
test (testStepOutPrecision.js:46:8)
|
|
(anonymous) (:0:0)
|
|
|
|
|
|
Running test: testStepIntoAtReturn
|
|
Check that stepInto at return go to resumed outer generator
|
|
bar (testStepIntoAtReturn.js:93:8)
|
|
-- await --
|
|
foo (testStepIntoAtReturn.js:88:14)
|
|
-- await --
|
|
test (testStepIntoAtReturn.js:82:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
bar (testStepIntoAtReturn.js:94:6)
|
|
-- await --
|
|
foo (testStepIntoAtReturn.js:88:14)
|
|
-- await --
|
|
test (testStepIntoAtReturn.js:82:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
foo (testStepIntoAtReturn.js:89:6)
|
|
-- await --
|
|
test (testStepIntoAtReturn.js:82:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
test (testStepIntoAtReturn.js:83:8)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
test (testStepIntoAtReturn.js:84:6)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
floodWithTimeouts (testStepIntoAtReturn.js:74:15)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepIntoAtReturn.js:75:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepIntoAtReturn.js:75:10)
|
|
test (testStepIntoAtReturn.js:80:8)
|
|
(anonymous) (:0:0)
|
|
|
|
|
|
Running test: testStepOverAtReturn
|
|
Check that stepOver at return go to resumed outer generator
|
|
bar (testStepIntoAtReturn.js:124:8)
|
|
-- await --
|
|
foo (testStepIntoAtReturn.js:119:14)
|
|
-- await --
|
|
test (testStepIntoAtReturn.js:113:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
bar (testStepIntoAtReturn.js:125:6)
|
|
-- await --
|
|
foo (testStepIntoAtReturn.js:119:14)
|
|
-- await --
|
|
test (testStepIntoAtReturn.js:113:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
foo (testStepIntoAtReturn.js:120:6)
|
|
-- await --
|
|
test (testStepIntoAtReturn.js:113:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
test (testStepIntoAtReturn.js:114:8)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
test (testStepIntoAtReturn.js:115:6)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
floodWithTimeouts (testStepIntoAtReturn.js:105:15)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepIntoAtReturn.js:106:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepIntoAtReturn.js:106:10)
|
|
test (testStepIntoAtReturn.js:111:8)
|
|
(anonymous) (:0:0)
|
|
|
|
|
|
Running test: testStepOutFromNotAwaitedCall
|
|
Checks stepOut from not awaited call
|
|
bar (testStepIntoAtReturn.js:158:8)
|
|
-- await --
|
|
foo (testStepIntoAtReturn.js:152:8)
|
|
-- await --
|
|
test (testStepIntoAtReturn.js:144:14)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
test (testStepIntoAtReturn.js:145:8)
|
|
-- await --
|
|
(anonymous) (:0:0)
|
|
|
|
floodWithTimeouts (testStepIntoAtReturn.js:136:15)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepIntoAtReturn.js:137:10)
|
|
-- setTimeout --
|
|
floodWithTimeouts (testStepIntoAtReturn.js:137:10)
|
|
test (testStepIntoAtReturn.js:142:8)
|
|
(anonymous) (:0:0)
|
|
|