Bug 105763 - Web Inspector: prepare HeapSnapshot.js for use with native heap snapshot
Summary: Web Inspector: prepare HeapSnapshot.js for use with native heap snapshot
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: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-26 03:43 PST by Yury Semikhatsky
Modified: 2012-12-26 04:09 PST (History)
9 users (show)

See Also:


Attachments
Patch (11.04 KB, patch)
2012-12-26 03:48 PST, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (10.98 KB, patch)
2012-12-26 03:56 PST, Yury Semikhatsky
apavlov: review+
apavlov: commit-queue+
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-12-26 03:43:12 PST
There are some implicit assumptions about the root node position etc which can be fixed to make HeapSnapshot.js more useful for native snapshots.
Comment 1 Yury Semikhatsky 2012-12-26 03:48:07 PST
Created attachment 180739 [details]
Patch
Comment 2 Ilya Tikhonovsky 2012-12-26 03:55:40 PST
Comment on attachment 180739 [details]
Patch

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

otherwise lgtm

> Source/WebCore/inspector/front-end/HeapSnapshot.js:1343
> +        for (var nodeOrdinal = 0, l = this.nodeCount; nodeOrdinal < l; ++nodeOrdinal) {
> +            if (nodeOrdinal === rootNodeOrdinal)

Please use the same logic here. We don't need additional if statement inside.
Comment 3 Yury Semikhatsky 2012-12-26 03:56:37 PST
Created attachment 180740 [details]
Patch
Comment 4 Yury Semikhatsky 2012-12-26 03:57:11 PST
(In reply to comment #2)
> Please use the same logic here. We don't need additional if statement inside.

Done.
Comment 5 Alexander Pavlov (apavlov) 2012-12-26 04:06:19 PST
Comment on attachment 180740 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        HeapSnapshot.js now expects root node to be either the first or the last(real) one

space between "last" and "(real)"?
Comment 6 Yury Semikhatsky 2012-12-26 04:08:24 PST
(In reply to comment #5)
> (From update of attachment 180740 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=180740&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        HeapSnapshot.js now expects root node to be either the first or the last(real) one
> 
> space between "last" and "(real)"?

Done.
Comment 7 Yury Semikhatsky 2012-12-26 04:09:07 PST
Committed r138475: <http://trac.webkit.org/changeset/138475>