When calculating distance from an object to Window in heap profiler we should only take into account strong real references. This means that shortcuts and weak edges should be ignored.
Created attachment 160439 [details] Patch
Comment on attachment 160439 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=160439&action=review > Source/WebCore/inspector/front-end/HeapSnapshot.js:958 > + var edgeType = containmentEdges[edgeToNodeIndex - edgeToNodeOffset + edgeTypeOffset]; This looks ugly. Let's iterate over edgeIndexes and add appropriate offsets instead of first adding and then subtracting the offsets.
Created attachment 160442 [details] Patch
comments addressed
Committed r126595: <http://trac.webkit.org/changeset/126595>