Bug 155478

Summary: Web Inspector: No way to see a path to a root for instances in the Heap Snapshot content view
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Description Flags
[PATCH] Proposed Fix
[IMAGE] Simple Path
[IMAGE] More Complex Path
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2016-03-14 17:22:48 PDT
Show path from root to instances in the Heap Snapshot content view.

When hovering the @1234 object identifier in the UI, show a popover that displays the shortest path from the root (typically Window) to the instance. When looking for leaks, this is an important way to understand exactly why the object is being kept alive.
Comment 1 Radar WebKit Bug Importer 2016-03-14 17:24:26 PDT
Comment 2 Joseph Pecoraro 2016-03-14 18:45:37 PDT
Created attachment 274063 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2016-03-14 18:46:04 PDT
Created attachment 274064 [details]
[IMAGE] Simple Path
Comment 4 Joseph Pecoraro 2016-03-14 18:46:27 PDT
Created attachment 274065 [details]
[IMAGE] More Complex Path
Comment 5 Joseph Pecoraro 2016-03-14 18:47:16 PDT
The images were taken when I was using an eye icon. That is no longer accurate, I switched to just hovering the object-id, @1234, to get the popover.
Comment 6 Joseph Pecoraro 2016-03-14 18:52:02 PDT
Created attachment 274066 [details]
[PATCH] Proposed Fix

Comment 7 Timothy Hatcher 2016-03-14 21:10:03 PDT
Comment on attachment 274066 [details]
[PATCH] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Models/HeapSnapshotRootPath.js:120
> +        let component = this._canPropertyNameBeDotAccess(propertyName) ? "." + propertyName : "[" + doubleQuotedString(propertyName) + "]";


> Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.css:130
> +    white-space: pre;

Why pre?
Comment 8 WebKit Commit Bot 2016-03-14 22:02:15 PDT
Comment on attachment 274066 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 274066

Committed r198196: <http://trac.webkit.org/changeset/198196>
Comment 9 WebKit Commit Bot 2016-03-14 22:02:19 PDT
All reviewed patches have been landed.  Closing bug.