| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 /** | 51 /** |
| 52 * @param {number} nodeIndex | 52 * @param {number} nodeIndex |
| 53 * @return {!WebInspector.JSHeapSnapshotNode} | 53 * @return {!WebInspector.JSHeapSnapshotNode} |
| 54 */ | 54 */ |
| 55 createNode: function(nodeIndex) | 55 createNode: function(nodeIndex) |
| 56 { | 56 { |
| 57 return new WebInspector.JSHeapSnapshotNode(this, nodeIndex); | 57 return new WebInspector.JSHeapSnapshotNode(this, nodeIndex); |
| 58 }, | 58 }, |
| 59 | 59 |
| 60 /** | 60 /** |
| 61 * @param {!Uint32Array} edges | 61 * @override |
| 62 * @param {number} edgeIndex | 62 * @param {number} edgeIndex |
| 63 * @return {!WebInspector.JSHeapSnapshotEdge} | 63 * @return {!WebInspector.JSHeapSnapshotEdge} |
| 64 */ | 64 */ |
| 65 createEdge: function(edges, edgeIndex) | 65 createEdge: function(edgeIndex) |
| 66 { | 66 { |
| 67 return new WebInspector.JSHeapSnapshotEdge(this, edges, edgeIndex); | 67 return new WebInspector.JSHeapSnapshotEdge(this, edgeIndex); |
| 68 }, | 68 }, |
| 69 | 69 |
| 70 /** | 70 /** |
| 71 * @param {number} retainedNodeIndex | 71 * @override |
| 72 * @param {number} retainerIndex | 72 * @param {number} retainerIndex |
| 73 * @return {!WebInspector.JSHeapSnapshotRetainerEdge} | 73 * @return {!WebInspector.JSHeapSnapshotRetainerEdge} |
| 74 */ | 74 */ |
| 75 createRetainingEdge: function(retainedNodeIndex, retainerIndex) | 75 createRetainingEdge: function(retainerIndex) |
| 76 { | 76 { |
| 77 return new WebInspector.JSHeapSnapshotRetainerEdge(this, retainedNodeInd
ex, retainerIndex); | 77 return new WebInspector.JSHeapSnapshotRetainerEdge(this, retainerIndex); |
| 78 }, | 78 }, |
| 79 | 79 |
| 80 /** | 80 /** |
| 81 * @return {function(!WebInspector.JSHeapSnapshotNode):boolean} | 81 * @return {function(!WebInspector.JSHeapSnapshotNode):boolean} |
| 82 */ | 82 */ |
| 83 classNodesFilter: function() | 83 classNodesFilter: function() |
| 84 { | 84 { |
| 85 function filter(node) | 85 function filter(node) |
| 86 { | 86 { |
| 87 return node.isUserObject(); | 87 return node.isUserObject(); |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 return result; | 632 return result; |
| 633 }, | 633 }, |
| 634 | 634 |
| 635 __proto__: WebInspector.HeapSnapshotNode.prototype | 635 __proto__: WebInspector.HeapSnapshotNode.prototype |
| 636 }; | 636 }; |
| 637 | 637 |
| 638 /** | 638 /** |
| 639 * @constructor | 639 * @constructor |
| 640 * @extends {WebInspector.HeapSnapshotEdge} | 640 * @extends {WebInspector.HeapSnapshotEdge} |
| 641 * @param {!WebInspector.JSHeapSnapshot} snapshot | 641 * @param {!WebInspector.JSHeapSnapshot} snapshot |
| 642 * @param {!Uint32Array} edges | |
| 643 * @param {number=} edgeIndex | 642 * @param {number=} edgeIndex |
| 644 */ | 643 */ |
| 645 WebInspector.JSHeapSnapshotEdge = function(snapshot, edges, edgeIndex) | 644 WebInspector.JSHeapSnapshotEdge = function(snapshot, edgeIndex) |
| 646 { | 645 { |
| 647 WebInspector.HeapSnapshotEdge.call(this, snapshot, edges, edgeIndex); | 646 WebInspector.HeapSnapshotEdge.call(this, snapshot, edgeIndex); |
| 648 } | 647 } |
| 649 | 648 |
| 650 WebInspector.JSHeapSnapshotEdge.prototype = { | 649 WebInspector.JSHeapSnapshotEdge.prototype = { |
| 651 /** | 650 /** |
| 652 * @return {!WebInspector.JSHeapSnapshotEdge} | 651 * @return {!WebInspector.JSHeapSnapshotEdge} |
| 653 */ | 652 */ |
| 654 clone: function() | 653 clone: function() |
| 655 { | 654 { |
| 656 var snapshot = /** @type {!WebInspector.JSHeapSnapshot} */ (this._snapsh
ot); | 655 var snapshot = /** @type {!WebInspector.JSHeapSnapshot} */ (this._snapsh
ot); |
| 657 return new WebInspector.JSHeapSnapshotEdge(snapshot, this._edges, this.e
dgeIndex); | 656 return new WebInspector.JSHeapSnapshotEdge(snapshot, this.edgeIndex); |
| 658 }, | 657 }, |
| 659 | 658 |
| 660 /** | 659 /** |
| 661 * @return {boolean} | 660 * @return {boolean} |
| 662 */ | 661 */ |
| 663 hasStringName: function() | 662 hasStringName: function() |
| 664 { | 663 { |
| 665 if (!this.isShortcut()) | 664 if (!this.isShortcut()) |
| 666 return this._hasStringName(); | 665 return this._hasStringName(); |
| 667 return isNaN(parseInt(this._name(), 10)); | 666 return isNaN(parseInt(this._name(), 10)); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 }, | 771 }, |
| 773 | 772 |
| 774 __proto__: WebInspector.HeapSnapshotEdge.prototype | 773 __proto__: WebInspector.HeapSnapshotEdge.prototype |
| 775 }; | 774 }; |
| 776 | 775 |
| 777 | 776 |
| 778 /** | 777 /** |
| 779 * @constructor | 778 * @constructor |
| 780 * @extends {WebInspector.HeapSnapshotRetainerEdge} | 779 * @extends {WebInspector.HeapSnapshotRetainerEdge} |
| 781 * @param {!WebInspector.JSHeapSnapshot} snapshot | 780 * @param {!WebInspector.JSHeapSnapshot} snapshot |
| 781 * @param {number} retainerIndex |
| 782 */ | 782 */ |
| 783 WebInspector.JSHeapSnapshotRetainerEdge = function(snapshot, retainedNodeIndex,
retainerIndex) | 783 WebInspector.JSHeapSnapshotRetainerEdge = function(snapshot, retainerIndex) |
| 784 { | 784 { |
| 785 WebInspector.HeapSnapshotRetainerEdge.call(this, snapshot, retainedNodeIndex
, retainerIndex); | 785 WebInspector.HeapSnapshotRetainerEdge.call(this, snapshot, retainerIndex); |
| 786 } | 786 } |
| 787 | 787 |
| 788 WebInspector.JSHeapSnapshotRetainerEdge.prototype = { | 788 WebInspector.JSHeapSnapshotRetainerEdge.prototype = { |
| 789 /** | 789 /** |
| 790 * @return {!WebInspector.JSHeapSnapshotRetainerEdge} | 790 * @return {!WebInspector.JSHeapSnapshotRetainerEdge} |
| 791 */ | 791 */ |
| 792 clone: function() | 792 clone: function() |
| 793 { | 793 { |
| 794 return new WebInspector.JSHeapSnapshotRetainerEdge(this._snapshot, this.
_retainedNodeIndex, this.retainerIndex()); | 794 var snapshot = /** @type {!WebInspector.JSHeapSnapshot} */ (this._snapsh
ot); |
| 795 return new WebInspector.JSHeapSnapshotRetainerEdge(snapshot, this.retain
erIndex()); |
| 795 }, | 796 }, |
| 796 | 797 |
| 797 /** | 798 /** |
| 798 * @return {boolean} | 799 * @return {boolean} |
| 799 */ | 800 */ |
| 800 isHidden: function() | 801 isHidden: function() |
| 801 { | 802 { |
| 802 return this._edge().isHidden(); | 803 return this._edge().isHidden(); |
| 803 }, | 804 }, |
| 804 | 805 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 830 * @return {boolean} | 831 * @return {boolean} |
| 831 */ | 832 */ |
| 832 isWeak: function() | 833 isWeak: function() |
| 833 { | 834 { |
| 834 return this._edge().isWeak(); | 835 return this._edge().isWeak(); |
| 835 }, | 836 }, |
| 836 | 837 |
| 837 __proto__: WebInspector.HeapSnapshotRetainerEdge.prototype | 838 __proto__: WebInspector.HeapSnapshotRetainerEdge.prototype |
| 838 } | 839 } |
| 839 | 840 |
| OLD | NEW |