+2012-04-12 Alexei Filippov <alexeif@chromium.org>
+
+ Web Inspector: Move meta node out of nodes in snapshot serialization.
+ https://bugs.webkit.org/show_bug.cgi?id=83701
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/profiler/heap-snapshot-test.js:
+ (initialize_HeapSnapshotTest.InspectorTest.createHeapSnapshotSplitNodesEdgesMockRaw):
+
2012-04-12 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK test_expectations post-Skipped-migration update.
// Return the same snapshot as above but having the nodes and edges
// separated.
return {
- snapshot: {},
- nodes: [
- {
- separate_edges: true,
+ snapshot: {
+ meta: {
node_fields: ["type", "name", "id", "self_size", "retained_size", "dominator", "edges_index"],
node_types: [["hidden", "object"], "", "", "", "", "", ""],
edge_fields: ["type", "name_or_index", "to_node"],
edge_types: [["element", "property"], "", ""]
},
+ node_count: 6,
+ edge_count: 7},
+ nodes: [
0, 0, 1, 0, 20, 0, 0,
1, 1, 2, 2, 2, 0, 6,
1, 2, 3, 3, 8, 0, 12,
InspectorTest._postprocessHeapSnapshotMock = function(mock)
{
- mock.metaNode = mock.nodes[0];
+ mock.snapshot.meta = mock.nodes[0];
mock.nodes[0] = 0;
var tempNodes = new Int32Array(1000);
tempNodes.set(mock.nodes);
+2012-04-12 Alexei Filippov <alexeif@chromium.org>
+
+ Web Inspector: Move meta node out of nodes in snapshot serialization.
+ https://bugs.webkit.org/show_bug.cgi?id=83701
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/front-end/HeapSnapshot.js:
+ (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
+ (WebInspector.HeapSnapshot):
+
2012-04-12 Yael Aharon <yael.aharon@nokia.com>
[Qt][WK2] Nested fixed elements scroll too fast
if (bracketIndex === -1)
return;
this._json = this._json.slice(bracketIndex + 1);
- this._state = "parse-nodes-meta-info";
+ if (this._snapshot.snapshot.meta) {
+ var node_fields_count = this._snapshot.snapshot.meta.node_fields.length;
+ var nodes_length = this._snapshot.snapshot.node_count * node_fields_count;
+ this._array = new WebInspector.Uint32Array(nodes_length);
+ this._snapshot.snapshot.meta.separate_edges = true;
+ this._state = "parse-nodes";
+ } else {
+ this._state = "parse-nodes-meta-info";
+ }
this.pushJSONChunk("");
break;
}
var closingBracketIndex = this._findBalancedCurlyBrackets();
if (closingBracketIndex === -1)
return;
- this._snapshot.metaNode = JSON.parse(this._json.slice(0, closingBracketIndex));
+ this._snapshot.snapshot.meta = JSON.parse(this._json.slice(0, closingBracketIndex));
this._json = this._json.slice(closingBracketIndex);
this._array = new WebInspector.Uint32Array();
- if (!this._snapshot.metaNode.separate_edges)
- this._array.push(0);
+ this._array.push(0);
this._state = "parse-nodes";
this.pushJSONChunk("");
break;
case "parse-nodes": {
if (this._parseUintArray())
return;
- if (this._snapshot.metaNode.separate_edges) {
+ if (this._snapshot.snapshot.meta.separate_edges) {
this._snapshot.onlyNodes = this._array.array;
this._state = "find-edges";
} else {
if (bracketIndex === -1)
return;
this._json = this._json.slice(bracketIndex + 1);
- this._array = new WebInspector.Uint32Array();
+ var edge_fields_count = this._snapshot.snapshot.meta.edge_fields.length;
+ var edges_length = this._snapshot.snapshot.edge_count * edge_fields_count;
+ this._array = new WebInspector.Uint32Array(edges_length);
this._state = "parse-edges";
this.pushJSONChunk("");
break;
this._onlyNodes = profile.onlyNodes;
this._containmentEdges = profile.containmentEdges;
/** @type{HeapSnapshotMetainfo} */
- this._metaNode = profile.metaNode;
+ this._metaNode = profile.snapshot.meta;
this._strings = profile.strings;
this._init();