[webkit-reviews] review denied: [Bug 87009] Web Inspector: introduce a helper for HeapSnapshot post-processing tests. : [Attachment 143007] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 21 05:39:39 PDT 2012


Yury Semikhatsky <yurys at chromium.org> has denied Ilya Tikhonovsky
<loislo at chromium.org>'s request for review:
Bug 87009: Web Inspector: introduce a helper for HeapSnapshot post-processing
tests.
https://bugs.webkit.org/show_bug.cgi?id=87009

Attachment 143007: Patch
https://bugs.webkit.org/attachment.cgi?id=143007&action=review

------- Additional Comments from Yury Semikhatsky <yurys at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=143007&action=review


> LayoutTests/inspector/profiler/heap-snapshot-test.js:384
> +    this._strings2id = {};

_strings2id -> _string2id

> LayoutTests/inspector/profiler/heap-snapshot-test.js:423
> +			       InspectorTest.HeapNode.hidden,

We should make sure the types here are ordered as their values above. Please
either use
 node_types[this._nodeTypes[n]] = n
to fill this array or use this._nodeTypes[n] = node_types.indexOf(n) to
initialize type constants.

> LayoutTests/inspector/profiler/heap-snapshot-test.js:496
> +	   this._strings2id[string] = this._nextStringId++;

Can this._strings.length be used as id?

> LayoutTests/inspector/profiler/heap-snapshot-test.js:510
> +InspectorTest.HeapNode.hidden = "hidden";

Should be InspectorTest.HeapNode.Type = {
"hidden": "hidden",...
}

> LayoutTests/inspector/profiler/heap-snapshot-test.js:532
> +	   if (nameOrIndex in this._edges)

this._edges is an array of InspectorTest.HeapEdge instances while nameOrIndex
is a string or number. The condition looks wrong.

> LayoutTests/inspector/profiler/heap-snapshot-test.js:550
> +	   rawSnapshot.nodes.push(this._ordinal * 2 + 1);    // id

You should add a comment explaining why the ids should be odd.

> LayoutTests/inspector/profiler/heap-snapshot-test.js:580
> +InspectorTest.HeapEdge.context = "context";

InspectorTest.HeapEdge.Type

> LayoutTests/inspector/profiler/heap-snapshot-test.js:587
> +InspectorTest.createFlagsTestSnapshot = function(instanceCount)

Consider putting this into the test file as it is used only once.


More information about the webkit-reviews mailing list