OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |