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

Side by Side Diff: Source/devtools/front_end/JSHeapSnapshot.js

Issue 204913005: Remove HeapSnapshot._markInvisibleEdges (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/HeapSnapshot.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 return filter; 119 return filter;
120 }, 120 },
121 121
122 dispose: function() 122 dispose: function()
123 { 123 {
124 WebInspector.HeapSnapshot.prototype.dispose.call(this); 124 WebInspector.HeapSnapshot.prototype.dispose.call(this);
125 delete this._flags; 125 delete this._flags;
126 }, 126 },
127 127
128 _markInvisibleEdges: function()
129 {
130 // Mark hidden edges of global objects as invisible.
131 // FIXME: This is a temporary measure. Normally, we should
132 // really hide all hidden nodes.
133 for (var iter = this.rootNode().edges(); iter.hasNext(); iter.next()) {
134 var edge = iter.edge;
135 if (!edge.isShortcut())
136 continue;
137 var node = edge.node();
138 var propNames = {};
139 for (var innerIter = node.edges(); innerIter.hasNext(); innerIter.ne xt()) {
140 var globalObjEdge = innerIter.edge;
141 if (globalObjEdge.isShortcut())
142 propNames[globalObjEdge._nameOrIndex()] = true;
143 }
144 for (var innerIter = node.edges(); innerIter.hasNext(); innerIter.ne xt()) {
145 var globalObjEdge = innerIter.edge;
146 if (!globalObjEdge.isShortcut()
147 && globalObjEdge.node().isHidden()
148 && globalObjEdge._hasStringName()
149 && (globalObjEdge._nameOrIndex() in propNames))
150 globalObjEdge._edges[globalObjEdge.edgeIndex + this._edgeTyp eOffset] = this._edgeInvisibleType;
151 }
152 }
153 },
154
155 _calculateFlags: function() 128 _calculateFlags: function()
156 { 129 {
157 this._flags = new Uint32Array(this.nodeCount); 130 this._flags = new Uint32Array(this.nodeCount);
158 this._markDetachedDOMTreeNodes(); 131 this._markDetachedDOMTreeNodes();
159 this._markQueriableHeapObjects(); 132 this._markQueriableHeapObjects();
160 this._markPageOwnedNodes(); 133 this._markPageOwnedNodes();
161 }, 134 },
162 135
163 /** 136 /**
164 * @param {!WebInspector.HeapSnapshotNode} node 137 * @param {!WebInspector.HeapSnapshotNode} node
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 * @return {boolean} 830 * @return {boolean}
858 */ 831 */
859 isWeak: function() 832 isWeak: function()
860 { 833 {
861 return this._edge().isWeak(); 834 return this._edge().isWeak();
862 }, 835 },
863 836
864 __proto__: WebInspector.HeapSnapshotRetainerEdge.prototype 837 __proto__: WebInspector.HeapSnapshotRetainerEdge.prototype
865 } 838 }
866 839
OLDNEW
« 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