Bug 158174 - Web Inspector: Not all transitively dominated nodes display their retained size
Summary: Web Inspector: Not all transitively dominated nodes display their retained size
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: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-05-27 17:08 PDT by Joseph Pecoraro
Modified: 2016-05-27 17:43 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.63 KB, patch)
2016-05-27 17:11 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2016-05-27 17:08:48 PDT
* SUMMARY
Not all transitively dominated nodes display their retained size.

* TEST
<script>
class Person {
    constructor(name) {
        this.name = name;
    }
}

class Group {
    constructor(...members) {
        this.members = members;
    }
}

let shared = new Person("Parent");
let p1 = new Person("Alpha");
let p2 = new Person("Beta");
let p3 = new Person("Gamma");    
p1.parent = p2.parent = p3.parent = shared;
shared = null;

console.takeHeapSnapshot("before");
window.group = new Group(p1, p2, p3);
setTimeout(() => { console.takeHeapSnapshot("after"); });
</script>

* STEPS TO REPRODUCE
1. Inspect test page
2. Show timeline tab
3. Show JavaScript allocations Timeline
4. Reload
5. Show snapshot diff of before + after
6. Expand Objects
  => The Group object should transitively retain the shared "Parent" object, but it doesn't appear to.
Comment 1 Radar WebKit Bug Importer 2016-05-27 17:09:57 PDT
<rdar://problem/26528515>
Comment 2 Joseph Pecoraro 2016-05-27 17:11:33 PDT
Created attachment 280013 [details]
[PATCH] Proposed Fix

Oops... I remember experimenting with different depths, but unintentionally it seems a fixed depth of 1-2 is what landed. We should go down as far as possible for the transitive cases.
Comment 3 WebKit Commit Bot 2016-05-27 17:43:01 PDT
Comment on attachment 280013 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 280013

Committed r201477: <http://trac.webkit.org/changeset/201477>
Comment 4 WebKit Commit Bot 2016-05-27 17:43:05 PDT
All reviewed patches have been landed.  Closing bug.