Bug 165235 - Web Inspector: Show async stack traces for workers
Summary: Web Inspector: Show async stack traces for workers
Status: RESOLVED FIXED
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: 165211
  Show dependency treegraph
 
Reported: 2016-11-30 17:33 PST by Matt Baker
Modified: 2016-12-01 14:32 PST (History)
7 users (show)

See Also:


Attachments
[Image] Updated UI (238.36 KB, image/png)
2016-11-30 17:35 PST, Matt Baker
no flags Details
Patch (15.54 KB, patch)
2016-11-30 22:48 PST, Matt Baker
no flags Details | Formatted Diff | Diff
Patch for landing (15.82 KB, patch)
2016-12-01 13:56 PST, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2016-11-30 17:33:01 PST
Summary:
Show async stack traces for workers. Both the single- and multi-threaded UI paths in DebuggerSidebarPanel need to account for async stack traces.

Note:
When showing multiple call stacks in the sidebar, styles for async boundary call frames need to account for different indentation levels.
Comment 1 Radar WebKit Bug Importer 2016-11-30 17:33:19 PST
<rdar://problem/29450172>
Comment 2 Matt Baker 2016-11-30 17:35:49 PST
Created attachment 295796 [details]
[Image] Updated UI
Comment 3 Matt Baker 2016-11-30 22:48:23 PST
Created attachment 295821 [details]
Patch
Comment 4 Joseph Pecoraro 2016-12-01 12:31:13 PST
When I apply this I get errors:

[Error] TypeError: this._updateSingleThreadCallStacks is not a function. (In 'this._updateSingleThreadCallStacks()', 'this._updateSingleThreadCallStacks' is undefined)
    _debuggerCallFramesDidChange — DebuggerSidebarPanel.js:682
    dispatch — Object.js:170
    dispatchEventToListeners — Object.js:177
    debuggerDidPause — DebuggerManager.js:643
    paused — DebuggerObserver.js:68
    dispatchEvent — InspectorBackend.js:287
    _dispatchEvent — Connection.js:193
    dispatch — Connection.js:71
    dispatch — InspectorBackend.js:151
    dispatchNextQueuedMessageFromBackend — MessageDispatcher.js:42

This appears to be legit.
Comment 5 Joseph Pecoraro 2016-12-01 12:39:48 PST
Comment on attachment 295821 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=295821&action=review

r=me

It seems _debuggerCallFramesDidChange's update single thread call stacks logic can now be eliminated!

> Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.css:47
> +.tree-outline > .children > .item.call-frame.async-boundary {

Maybe the .children here is not needed?

> Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.css:52
> +.tree-outline:not(.single-thread) > .children > .item.call-frame.async-boundary {

Here it seems it might be.

> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:631
> +        this._mainTargetTreeElement.selectable = !singleThreadShowing;

Very clever and elegant!
Comment 6 Matt Baker 2016-12-01 13:48:55 PST
Comment on attachment 295821 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=295821&action=review

>> Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.css:47
>> +.tree-outline > .children > .item.call-frame.async-boundary {
> 
> Maybe the .children here is not needed?

CallFrameTreeElements are always parented by a ThreadTreeElement now. This level of specificity might be unnecessary though.

>> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:631
>> +        this._mainTargetTreeElement.selectable = !singleThreadShowing;
> 
> Very clever and elegant!

I didn't see the need for line 631 until I tried out the change and noticed what happened to keyboard navigation!
Comment 7 Matt Baker 2016-12-01 13:56:47 PST
Created attachment 295890 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2016-12-01 14:32:54 PST
Comment on attachment 295890 [details]
Patch for landing

Clearing flags on attachment: 295890

Committed r209213: <http://trac.webkit.org/changeset/209213>
Comment 9 WebKit Commit Bot 2016-12-01 14:32:58 PST
All reviewed patches have been landed.  Closing bug.