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

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

Issue 212773005: DevTools: Show all objects in class view in advanced heap snapshot mode. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline 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/HeapSnapshotView.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..19614ff56019183d1d5051f3b6f90570e7c068bf 100644
--- a/Source/devtools/front_end/JSHeapSnapshot.js
+++ b/Source/devtools/front_end/JSHeapSnapshot.js
@@ -31,9 +31,10 @@
/**
* @constructor
* @param {!WebInspector.HeapSnapshotProgress} progress
+ * @param {boolean} showHiddenData
* @extends {WebInspector.HeapSnapshot}
*/
-WebInspector.JSHeapSnapshot = function(profile, progress)
+WebInspector.JSHeapSnapshot = function(profile, progress, showHiddenData)
{
this._nodeFlags = { // bit flags
canBeQueried: 1,
@@ -44,7 +45,7 @@ WebInspector.JSHeapSnapshot = function(profile, progress)
visitedMarker: 0x10000 // bits: 1,0000,0000,0000,0000
};
this._lazyStringCache = { };
- WebInspector.HeapSnapshot.call(this, profile, progress);
+ WebInspector.HeapSnapshot.call(this, profile, progress, showHiddenData);
}
WebInspector.JSHeapSnapshot.prototype = {
@@ -78,23 +79,28 @@ WebInspector.JSHeapSnapshot.prototype = {
},
/**
- * @return {function(!WebInspector.JSHeapSnapshotNode):boolean}
+ * @override
+ * @return {?function(!WebInspector.JSHeapSnapshotNode):boolean}
*/
classNodesFilter: function()
{
+ /**
+ * @param {!WebInspector.JSHeapSnapshotNode} node
+ * @return {boolean}
+ */
function filter(node)
{
return node.isUserObject();
}
- return filter;
+ return this._showHiddenData ? null : filter;
},
/**
- * @param {boolean} showHiddenData
* @return {function(!WebInspector.HeapSnapshotEdge):boolean}
*/
- containmentEdgesFilter: function(showHiddenData)
+ containmentEdgesFilter: function()
{
+ var showHiddenData = this._showHiddenData;
function filter(edge) {
if (edge.isInvisible())
return false;
@@ -106,12 +112,11 @@ WebInspector.JSHeapSnapshot.prototype = {
},
/**
- * @param {boolean} showHiddenData
* @return {function(!WebInspector.HeapSnapshotEdge):boolean}
*/
- retainingEdgesFilter: function(showHiddenData)
+ retainingEdgesFilter: function()
{
- var containmentEdgesFilter = this.containmentEdgesFilter(showHiddenData);
+ var containmentEdgesFilter = this.containmentEdgesFilter();
function filter(edge)
{
return containmentEdgesFilter(edge) && !edge.node().isRoot() && !edge.isWeak();
@@ -221,11 +226,11 @@ WebInspector.JSHeapSnapshot.prototype = {
},
/**
- * @return {!{map: !Uint32Array, flag: number}}
+ * @return {?{map: !Uint32Array, flag: number}}
*/
userObjectsMapAndFlag: function()
{
- return {
+ return this._showHiddenData ? null : {
map: this._flags,
flag: this._nodeFlags.pageObject
};
« no previous file with comments | « Source/devtools/front_end/HeapSnapshotView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698