Bug 167083 - Web Inspector: capture async stack trace when web content calls addEventListener, window.postMessage, fetch, XHR.send
Summary: Web Inspector: capture async stack trace when web content calls addEventListe...
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:
Blocks:
 
Reported: 2017-01-15 14:50 PST by BJ Burg
Modified: 2017-07-21 19:27 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2017-01-15 14:50:00 PST
We should capture for more async script initiators. These are all for DOM methods.
Comment 1 Radar WebKit Bug Importer 2017-01-15 14:50:12 PST
<rdar://problem/30033664>
Comment 2 Matt Baker 2017-04-22 21:17:53 PDT
It looks like DOMWindow already saves the call stack on postMessage (WebCore/page/DOMWindow.cpp:980), so long as the console agent is enabled. This is done so that if a target origin error occurs the console error can include a call stack.

Instead of saving the call stack in the PostMessageTimer, DOMWindow should look up the current async stack trace using the InspectorDebuggerAgent.
Comment 3 Matt Baker 2017-07-21 19:27:28 PDT
Closing. This has been split into the following:

Web Inspector: capture an async stack trace when web content calls addEventListener
<https://webkit.org/b/174739>

Web Inspector: capture async stack trace when workers/main context posts a message
<https://webkit.org/b/167084>

Web Inspector: capture async stack trace when web content calls fetch, XHR.send
<https://webkit.org/b/174742>