Bug 94947 - Web Inspector: do not count weak and shortcut edges when calculating distance to window
Summary: Web Inspector: do not count weak and shortcut edges when calculating distance...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ilya Tikhonovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-24 09:44 PDT by Yury Semikhatsky
Modified: 2012-08-24 10:10 PDT (History)
10 users (show)

See Also:


Attachments
Patch (2.53 KB, patch)
2012-08-24 09:48 PDT, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
Patch (2.78 KB, patch)
2012-08-24 10:02 PDT, Ilya Tikhonovsky
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2012-08-24 09:44:59 PDT
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.
Comment 1 Ilya Tikhonovsky 2012-08-24 09:48:09 PDT
Created attachment 160439 [details]
Patch
Comment 2 Yury Semikhatsky 2012-08-24 09:58:02 PDT
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.
Comment 3 Ilya Tikhonovsky 2012-08-24 10:02:51 PDT
Created attachment 160442 [details]
Patch
Comment 4 Ilya Tikhonovsky 2012-08-24 10:05:33 PDT
comments addressed
Comment 5 Ilya Tikhonovsky 2012-08-24 10:10:01 PDT
Committed r126595: <http://trac.webkit.org/changeset/126595>