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

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

Issue 211273005: Do not override data getter in heap snapshot grid nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unused parameter from findRow 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 this._edges = snapshot._containmentEdges; 57 this._edges = snapshot._containmentEdges;
58 this.edgeIndex = edgeIndex || 0; 58 this.edgeIndex = edgeIndex || 0;
59 } 59 }
60 60
61 /** 61 /**
62 * @constructor 62 * @constructor
63 * @param {string} name 63 * @param {string} name
64 * @param {!WebInspector.HeapSnapshotNode.Serialized} node 64 * @param {!WebInspector.HeapSnapshotNode.Serialized} node
65 * @param {number} nodeIndex 65 * @param {number} nodeIndex
66 * @param {string} type 66 * @param {string} type
67 * @param {number} distance
68 */ 67 */
69 WebInspector.HeapSnapshotEdge.Serialized = function(name, node, nodeIndex, type, distance) { 68 WebInspector.HeapSnapshotEdge.Serialized = function(name, node, nodeIndex, type)
69 {
70 this.name = name; 70 this.name = name;
71 this.node = node; 71 this.node = node;
72 this.nodeIndex = nodeIndex; 72 this.nodeIndex = nodeIndex;
73 this.type = type; 73 this.type = type;
74 this.distance = distance;
75 }; 74 };
76 75
77 WebInspector.HeapSnapshotEdge.prototype = { 76 WebInspector.HeapSnapshotEdge.prototype = {
78 /** 77 /**
79 * @return {!WebInspector.HeapSnapshotEdge} 78 * @return {!WebInspector.HeapSnapshotEdge}
80 */ 79 */
81 clone: function() 80 clone: function()
82 { 81 {
83 return new WebInspector.HeapSnapshotEdge(this._snapshot, this.edgeIndex) ; 82 return new WebInspector.HeapSnapshotEdge(this._snapshot, this.edgeIndex) ;
84 }, 83 },
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return this.edgeIndex; 139 return this.edgeIndex;
141 }, 140 },
142 141
143 /** 142 /**
144 * @override 143 * @override
145 * @return {!WebInspector.HeapSnapshotEdge.Serialized} 144 * @return {!WebInspector.HeapSnapshotEdge.Serialized}
146 */ 145 */
147 serialize: function() 146 serialize: function()
148 { 147 {
149 var node = this.node(); 148 var node = this.node();
150 return new WebInspector.HeapSnapshotEdge.Serialized(this.name(), node.se rialize(), this.nodeIndex(), this.type(), node.distance()); 149 return new WebInspector.HeapSnapshotEdge.Serialized(this.name(), node.se rialize(), this.nodeIndex(), this.type());
151 }, 150 },
152 151
153 _type: function() 152 _type: function()
154 { 153 {
155 return this._edges[this.edgeIndex + this._snapshot._edgeTypeOffset]; 154 return this._edges[this.edgeIndex + this._snapshot._edgeTypeOffset];
156 } 155 }
157 }; 156 };
158 157
159 158
160 /** 159 /**
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 this._snapshot = snapshot; 303 this._snapshot = snapshot;
305 this.setRetainerIndex(retainerIndex); 304 this.setRetainerIndex(retainerIndex);
306 } 305 }
307 306
308 /** 307 /**
309 * @constructor 308 * @constructor
310 * @param {string} name 309 * @param {string} name
311 * @param {!WebInspector.HeapSnapshotNode.Serialized} node 310 * @param {!WebInspector.HeapSnapshotNode.Serialized} node
312 * @param {number} nodeIndex 311 * @param {number} nodeIndex
313 * @param {string} type 312 * @param {string} type
314 * @param {number} distance
315 */ 313 */
316 WebInspector.HeapSnapshotRetainerEdge.Serialized = function(name, node, nodeInde x, type, distance) { 314 WebInspector.HeapSnapshotRetainerEdge.Serialized = function(name, node, nodeInde x, type) {
317 this.name = name; 315 this.name = name;
318 this.node = node; 316 this.node = node;
319 this.nodeIndex = nodeIndex; 317 this.nodeIndex = nodeIndex;
320 this.type = type; 318 this.type = type;
321 this.distance = distance;
322 } 319 }
323 320
324 WebInspector.HeapSnapshotRetainerEdge.prototype = { 321 WebInspector.HeapSnapshotRetainerEdge.prototype = {
325 /** 322 /**
326 * @return {!WebInspector.HeapSnapshotRetainerEdge} 323 * @return {!WebInspector.HeapSnapshotRetainerEdge}
327 */ 324 */
328 clone: function() 325 clone: function()
329 { 326 {
330 return new WebInspector.HeapSnapshotRetainerEdge(this._snapshot, this.re tainerIndex()); 327 return new WebInspector.HeapSnapshotRetainerEdge(this._snapshot, this.re tainerIndex());
331 }, 328 },
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 return this._retainerIndex; 420 return this._retainerIndex;
424 }, 421 },
425 422
426 /** 423 /**
427 * @override 424 * @override
428 * @return {!WebInspector.HeapSnapshotRetainerEdge.Serialized} 425 * @return {!WebInspector.HeapSnapshotRetainerEdge.Serialized}
429 */ 426 */
430 serialize: function() 427 serialize: function()
431 { 428 {
432 var node = this.node(); 429 var node = this.node();
433 return new WebInspector.HeapSnapshotRetainerEdge.Serialized(this.name(), node.serialize(), this.nodeIndex(), this.type(), node.distance()); 430 return new WebInspector.HeapSnapshotRetainerEdge.Serialized(this.name(), node.serialize(), this.nodeIndex(), this.type());
434 }, 431 },
435 432
436 /** 433 /**
437 * @return {string} 434 * @return {string}
438 */ 435 */
439 type: function() 436 type: function()
440 { 437 {
441 return this._edge().type(); 438 return this._edge().type();
442 } 439 }
443 } 440 }
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2325 * @param {number} windowRight 2322 * @param {number} windowRight
2326 */ 2323 */
2327 sort: function(comparator, leftBound, rightBound, windowLeft, windowRight) 2324 sort: function(comparator, leftBound, rightBound, windowLeft, windowRight)
2328 { 2325 {
2329 this._iterationOrder.sortRange(this._buildCompareFunction(comparator), l eftBound, rightBound, windowLeft, windowRight); 2326 this._iterationOrder.sortRange(this._buildCompareFunction(comparator), l eftBound, rightBound, windowLeft, windowRight);
2330 }, 2327 },
2331 2328
2332 __proto__: WebInspector.HeapSnapshotItemProvider.prototype 2329 __proto__: WebInspector.HeapSnapshotItemProvider.prototype
2333 } 2330 }
2334 2331
OLDNEW
« no previous file with comments | « LayoutTests/inspector/profiler/heap-snapshot-test.js ('k') | Source/devtools/front_end/HeapSnapshotDataGrids.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698