Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4759)

Unified Diff: Source/devtools/front_end/JSHeapSnapshot.js

Issue 23609064: Make "three snapshot technique" work on heap snapshots loaded from files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/HeapSnapshotView.js ('k') | Source/devtools/front_end/ProfilesPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/JSHeapSnapshot.js
diff --git a/Source/devtools/front_end/JSHeapSnapshot.js b/Source/devtools/front_end/JSHeapSnapshot.js
index 8b4873a7a32a9f4a08ac410b4cb381c0eebf26a2..1fa2aeb965613036674b5baa58c52aeeb9f8134c 100644
--- a/Source/devtools/front_end/JSHeapSnapshot.js
+++ b/Source/devtools/front_end/JSHeapSnapshot.js
@@ -48,6 +48,23 @@ WebInspector.JSHeapSnapshot = function(profile, progress)
}
WebInspector.JSHeapSnapshot.prototype = {
+ maxJsNodeId: function()
+ {
+ var nodeFieldCount = this._nodeFieldCount;
+ var nodes = this._nodes;
+ var nodesLength = nodes.length;
+ var id = 0;
+ for (var nodeIndex = this._nodeIdOffset; nodeIndex < nodesLength; nodeIndex += nodeFieldCount) {
+ var nextId = nodes[nodeIndex];
+ // JS objects have odd ids, skip native objects.
+ if (nextId % 2 === 0)
+ continue;
+ if (id < nodes[nodeIndex])
+ id = nodes[nodeIndex];
+ }
+ return id;
+ },
+
createNode: function(nodeIndex)
{
return new WebInspector.JSHeapSnapshotNode(this, nodeIndex);
« no previous file with comments | « Source/devtools/front_end/HeapSnapshotView.js ('k') | Source/devtools/front_end/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698