Bug 69948 - Web Inspector: [Chromium] Heap profiler should designate weak references
Summary: Web Inspector: [Chromium] Heap profiler should designate weak references
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: Mikhail Naganov
URL:
Keywords:
Depends on:
Blocks: 72714
  Show dependency treegraph
 
Reported: 2011-10-12 11:36 PDT by Mikhail Naganov
Modified: 2011-12-05 09:31 PST (History)
12 users (show)

See Also:


Attachments
Patch (3.75 KB, patch)
2011-12-05 05:31 PST, Mikhail Naganov
yurys: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Naganov 2011-10-12 11:36:38 PDT
Weak persistent handles doesn't prevent objects from deletion, so they either should not be shown in retaining paths, or should be marked somehow.
Comment 1 Mikhail Naganov 2011-11-18 04:03:15 PST
See http://code.google.com/p/v8/issues/detail?id=1832 for details.
Comment 2 Mikhail Naganov 2011-12-05 05:31:36 PST
Created attachment 117869 [details]
Patch
Comment 3 Yury Semikhatsky 2011-12-05 05:47:11 PST
Comment on attachment 117869 [details]
Patch

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

> Source/WebCore/inspector/front-end/HeapSnapshot.js:287
> +        case "weak": return "[[" + this.name + "]]";

Can we have a tooltip explaining to the user what this text graphics means?
Comment 4 Mikhail Naganov 2011-12-05 08:21:20 PST
Comment on attachment 117869 [details]
Patch

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

>> Source/WebCore/inspector/front-end/HeapSnapshot.js:287
>> +        case "weak": return "[[" + this.name + "]]";
> 
> Can we have a tooltip explaining to the user what this text graphics means?

This actually should never appear in path traces, as we exclude weak references when building them. So this is mostly for debugging purposes.
Comment 5 WebKit Review Bot 2011-12-05 09:12:01 PST
Comment on attachment 117869 [details]
Patch

Attachment 117869 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10736347

New failing tests:
svg/custom/linking-uri-01-b.svg
Comment 6 Mikhail Naganov 2011-12-05 09:31:10 PST
Manually committed r102006.

2011-12-05  Mikhail Naganov  <mnaganov@chromium.org>

        Web Inspector: [Chromium] Heap profiler should designate weak references.
        https://bugs.webkit.org/show_bug.cgi?id=69948

        Weak references are now ignored when tracing paths to GC roots.

        Reviewed by Yury Semikhatsky.

        * inspector/front-end/HeapSnapshot.js:
        (WebInspector.HeapSnapshotEdge.prototype.get isWeak):
        (WebInspector.HeapSnapshotEdge.prototype.toString):
        (WebInspector.HeapSnapshotEdge.prototype.get _hasStringName):
        (WebInspector.HeapSnapshotRetainerEdge.prototype.get isWeak):
        (WebInspector.HeapSnapshot.prototype._init):
        (WebInspector.HeapSnapshotPathFinder.prototype._fillRootChildren):
        (WebInspector.HeapSnapshotPathFinder.prototype._skipEdge):