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

Unified Diff: Source/devtools/front_end/heap_snapshot_worker/HeapSnapshot.js

Issue 708903005: DevTools: don't spam console with messages about unreachable objects in heap snapshot (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/heap_snapshot_worker/HeapSnapshot.js
diff --git a/Source/devtools/front_end/heap_snapshot_worker/HeapSnapshot.js b/Source/devtools/front_end/heap_snapshot_worker/HeapSnapshot.js
index 91811481efadb819047de8960d81ab691992cd91..5409412e1928708eefff23e1bcb33b6ffa1fe247 100644
--- a/Source/devtools/front_end/heap_snapshot_worker/HeapSnapshot.js
+++ b/Source/devtools/front_end/heap_snapshot_worker/HeapSnapshot.js
@@ -1568,7 +1568,7 @@ WebInspector.HeapSnapshot.prototype = {
if (postOrderIndex === nodeCount || iteration > 1)
break;
- var errors = new WebInspector.HeapSnapshotProblemReport("Error: Corrupted snapshot. " + (nodeCount - postOrderIndex) + " nodes are unreachable from the root:");
+ var errors = new WebInspector.HeapSnapshotProblemReport("Heap snapshot: " + (nodeCount - postOrderIndex) + " nodes are unreachable from the root. Following nodes have only weak retainers:");
var dumpNode = this.rootNode();
// Remove root from the result (last node in the array) and put it at the bottom of the stack so that it is
// visited after all orphan nodes and their subgraphs.
@@ -1584,18 +1584,16 @@ WebInspector.HeapSnapshot.prototype = {
stackNodes[++stackTop] = i;
stackCurrentEdge[stackTop] = firstEdgeIndexes[i];
visited[i] = 1;
- errors.addError(dumpNode.name() + " @" + dumpNode.id() + " - node has only weak retainers.");
- } else {
errors.addError(dumpNode.name() + " @" + dumpNode.id());
}
}
}
- this._progress.reportProblem(errors.toString());
+ console.warn(errors.toString());
}
// If we already processed all orphan nodes that have only weak retainers and still have some orphans...
if (postOrderIndex !== nodeCount) {
- var errors = new WebInspector.HeapSnapshotProblemReport("Error: Still found " + (nodeCount - postOrderIndex) + " unreachable nodes:");
+ var errors = new WebInspector.HeapSnapshotProblemReport("Still found " + (nodeCount - postOrderIndex) + " unreachable nodes in heap snapshot:");
var dumpNode = this.rootNode();
// Remove root from the result (last node in the array) and put it at the bottom of the stack so that it is
// visited after all orphan nodes and their subgraphs.
@@ -1611,7 +1609,7 @@ WebInspector.HeapSnapshot.prototype = {
}
nodeOrdinal2PostOrderIndex[rootNodeOrdinal] = postOrderIndex;
postOrderIndex2NodeOrdinal[postOrderIndex++] = rootNodeOrdinal;
- this._progress.reportProblem(errors.toString());
+ console.warn(errors.toString());
}
return {postOrderIndex2NodeOrdinal: postOrderIndex2NodeOrdinal, nodeOrdinal2PostOrderIndex: nodeOrdinal2PostOrderIndex};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698