f296dad962
This patch tracks the stack of async functions differently from other Promise async stack tracking. With this patch, the stack trace of a callstack of async functions should look similarly to the call stack if all of the functions were synchronous. An example can be found in the updated test expectations: https://codereview.chromium.org/2362923002 . The new stack traces are implemented using existing mechanisms in the inspector. The inspector has two ways to save async stack traces: recurring and non-recurring stacks. An example of a non-recurring stack is setTimeout, and a recurring one is saved for setInterval. Recurring stacks are deleted only when a special "cancel" function is called, rather than being deleted after being used the first time. Previous Promise async stack tracking always used non-recurring stacks. For async functions, this patch saves a recurring stack. The top frame of the stack is duplicated, as the resuming function contains a similar frame; the devtools frontend is responsible for removing or marking this frame, which it can do based on seeing the [async function] line which follows it. The second frame will instead be provided by the resuming execution context. The recurring stack is saved when the async function is entered, and it is deleted from a finally block. The id of the stack is saved in the outer Promise being constructed by the async function. When an intermediate throwaway Promise will be triggered as a reaction, it will be identified as such based on its debugging metadata, and the corresponding async function's recurring stack will be used. BUG=v8:4483 Review-Url: https://codereview.chromium.org/2357423002 Cr-Commit-Position: refs/heads/master@{#39695} |
||
---|---|---|
.. | ||
regress | ||
array-concat-array-proto-getter.js | ||
array-concat-array-proto.js | ||
array-concat-object-proto-dict-getter.js | ||
array-concat-object-proto-dict.js | ||
array-concat-object-proto-generic-dict.js | ||
array-concat-object-proto.js | ||
async-arrow-lexical-arguments.js | ||
async-arrow-lexical-new.target.js | ||
async-arrow-lexical-super.js | ||
async-arrow-lexical-this.js | ||
async-await-basic.js | ||
async-await-no-constructor.js | ||
async-await-resolve-new.js | ||
async-await-species.js | ||
async-debug-basic.js | ||
async-debug-caught-exception-cases0.js | ||
async-debug-caught-exception-cases1.js | ||
async-debug-caught-exception-cases2.js | ||
async-debug-caught-exception-cases3.js | ||
async-debug-caught-exception-cases.js | ||
async-debug-caught-exception.js | ||
async-debug-step-abort-at-break.js | ||
async-debug-step-continue-at-break.js | ||
async-debug-step-in-and-out.js | ||
async-debug-step-in-out-out.js | ||
async-debug-step-in.js | ||
async-debug-step-nested.js | ||
async-debug-step-next-constant.js | ||
async-debug-step-next.js | ||
async-debug-step-out.js | ||
async-destructuring.js | ||
async-function-debug-evaluate.js | ||
async-function-debug-scopes.js | ||
async-function-stacktrace.js | ||
atomics.js | ||
block-lazy-compile.js | ||
dataview-accessors.js | ||
debug-async-break-on-stack.js | ||
debug-async-break.js | ||
debug-async-function-async-task-event.js | ||
debug-async-liveedit.js | ||
default-parameter-do-expression.js | ||
do-expressions-control.js | ||
do-expressions.js | ||
for-in.js | ||
function-sent.js | ||
futex.js | ||
generators-turbo.js | ||
generators.js | ||
harmony-string-pad-end.js | ||
harmony-string-pad-start.js | ||
mirror-async-function-promise.js | ||
mirror-async-function.js | ||
module-parsing-eval.js | ||
object-entries.js | ||
object-get-own-property-descriptors.js | ||
object-values.js | ||
private-symbols.js | ||
private.js | ||
regexp-change-exec.js | ||
regexp-lookbehind.js | ||
regexp-named-captures.js | ||
regexp-property-binary.js | ||
regexp-property-blocks.js | ||
regexp-property-char-class.js | ||
regexp-property-disabled.js | ||
regexp-property-enumerated.js | ||
regexp-property-exact-match.js | ||
regexp-property-general-category.js | ||
regexp-property-lu-ui.js | ||
regexp-property-scripts.js | ||
regexp-property-special.js | ||
set-prototype-of.js | ||
sharedarraybuffer.js | ||
simd.js | ||
sloppy-implicit-block-function.js | ||
sloppy-legacy-duplicate-generators.js | ||
sloppy-no-duplicate-async.js | ||
sloppy-no-duplicate-generators.js | ||
sloppy-restrictive-block-function.js | ||
to-length.js | ||
to-name.js | ||
to-number.js | ||
to-primitive.js | ||
to-string.js | ||
trailing-commas-length.js |