We should capture for more async script initiators. These are all for DOM methods.
<rdar://problem/30033664>
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.
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>