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

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

Issue 214713004: DevTools: Calculate user object distances from Window not from NativeContext. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/HeapSnapshot.js ('k') | no next file » | 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 eb6ec978ffdff38fbde91220a3f478c4f2750fe6..55bf7239130603f0d9d9e3d5701df8814073b74f 100644
--- a/Source/devtools/front_end/JSHeapSnapshot.js
+++ b/Source/devtools/front_end/JSHeapSnapshot.js
@@ -163,21 +163,6 @@ WebInspector.JSHeapSnapshot.prototype = {
return null;
}
- /**
- * @param {!WebInspector.HeapSnapshotNode} node
- * @param {!string} name
- * @return {?WebInspector.HeapSnapshotNode}
- */
- function getChildNodeByLinkName(node, name)
- {
- for (var iter = node.edges(); iter.hasNext(); iter.next()) {
- var edge = iter.edge;
- if (edge.name() === name)
- return edge.node();
- }
- return null;
- }
-
var visitedNodes = {};
/**
* @param {!WebInspector.HeapSnapshotNode} node
@@ -198,15 +183,8 @@ WebInspector.JSHeapSnapshot.prototype = {
if (userRootsOnly) {
for (var iter = this.rootNode().edges(); iter.hasNext(); iter.next()) {
var node = iter.edge.node();
- if (node.isDocumentDOMTreesRoot())
+ if (this._isUserRoot(node))
doAction(node);
- else if (node.isUserRoot()) {
- var nativeContextNode = getChildNodeByLinkName(node, "native_context");
- if (nativeContextNode)
- doAction(nativeContextNode);
- else
- doAction(node);
- }
}
} else {
for (var iter = gcRoots.edges(); iter.hasNext(); iter.next()) {
« no previous file with comments | « Source/devtools/front_end/HeapSnapshot.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698