Bug 164556 - Web Inspector: Debugger support for chained async call stacks
Summary: Web Inspector: Debugger support for chained async call stacks
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on: 163230
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-09 12:05 PST by Matt Baker
Modified: 2016-11-09 20:48 PST (History)
6 users (show)

See Also:


Attachments
[Image] multiple boundaries (141.35 KB, image/png)
2016-11-09 20:47 PST, Matt Baker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2016-11-09 12:05:36 PST
Summary:
Debugger support for chained async call stacks. Currently the backend removes the call stack for an async function immediately after it's callback has dispatched. However the callback may schedule additional async function calls, for example:

function h() {
   debugger;
}

function g() {
   setTimeout(h, 100);
}

function f() {
   setTimeout(g, 100);
}

f();

This should produce the following call stack in the debugger:

> h
  setTimeout (async boundary)
  g
  setTimeout (async boundary)
  f

Notes:
A straightforward way to accomplish this would be to extend the AsyncCallData struct in InspectorDebuggerAgent to include a reference count and back pointer to the previous AsyncCallData (if any).
Comment 1 Radar WebKit Bug Importer 2016-11-09 12:08:38 PST
<rdar://problem/29183687>
Comment 2 Matt Baker 2016-11-09 20:47:35 PST
Created attachment 294329 [details]
[Image] multiple boundaries

Got it working!

Going to close this bug and merge the work into the original issue:
https://bugs.webkit.org/show_bug.cgi?id=163230