OLD | NEW |
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 /** | 44 /** |
45 * List of position ranges for all visible nodes: [startPos1, endPos1),...,[
startPosN, endPosN) | 45 * List of position ranges for all visible nodes: [startPos1, endPos1),...,[
startPosN, endPosN) |
46 * Position is an item position in the provider. | 46 * Position is an item position in the provider. |
47 */ | 47 */ |
48 this._retrievedChildrenRanges = []; | 48 this._retrievedChildrenRanges = []; |
49 | 49 |
50 /** | 50 /** |
51 * @type {?WebInspector.HeapSnapshotGridNode.ChildrenProvider} | 51 * @type {?WebInspector.HeapSnapshotGridNode.ChildrenProvider} |
52 */ | 52 */ |
53 this._providerObject = null; | 53 this._providerObject = null; |
54 } | 54 }; |
55 | 55 |
56 /** @enum {symbol} */ | 56 /** @enum {symbol} */ |
57 WebInspector.HeapSnapshotGridNode.Events = { | 57 WebInspector.HeapSnapshotGridNode.Events = { |
58 PopulateComplete: Symbol("PopulateComplete") | 58 PopulateComplete: Symbol("PopulateComplete") |
59 } | 59 }; |
60 | 60 |
61 /** | 61 /** |
62 * @param {!Array.<string>} fieldNames | 62 * @param {!Array.<string>} fieldNames |
63 * @return {!WebInspector.HeapSnapshotCommon.ComparatorConfig} | 63 * @return {!WebInspector.HeapSnapshotCommon.ComparatorConfig} |
64 */ | 64 */ |
65 WebInspector.HeapSnapshotGridNode.createComparator = function(fieldNames) | 65 WebInspector.HeapSnapshotGridNode.createComparator = function(fieldNames) |
66 { | 66 { |
67 return /** @type {!WebInspector.HeapSnapshotCommon.ComparatorConfig} */ ({fi
eldName1: fieldNames[0], ascending1: fieldNames[1], fieldName2: fieldNames[2], a
scending2: fieldNames[3]}); | 67 return /** @type {!WebInspector.HeapSnapshotCommon.ComparatorConfig} */ ({fi
eldName1: fieldNames[0], ascending1: fieldNames[1], fieldName2: fieldNames[2], a
scending2: fieldNames[3]}); |
68 } | 68 }; |
69 | 69 |
70 | 70 |
71 /** | 71 /** |
72 * @interface | 72 * @interface |
73 */ | 73 */ |
74 WebInspector.HeapSnapshotGridNode.ChildrenProvider = function() { } | 74 WebInspector.HeapSnapshotGridNode.ChildrenProvider = function() { }; |
75 | 75 |
76 WebInspector.HeapSnapshotGridNode.ChildrenProvider.prototype = { | 76 WebInspector.HeapSnapshotGridNode.ChildrenProvider.prototype = { |
77 dispose: function() { }, | 77 dispose: function() { }, |
78 | 78 |
79 /** | 79 /** |
80 * @param {number} snapshotObjectId | 80 * @param {number} snapshotObjectId |
81 * @return {!Promise<number>} | 81 * @return {!Promise<number>} |
82 */ | 82 */ |
83 nodePosition: function(snapshotObjectId) { }, | 83 nodePosition: function(snapshotObjectId) { }, |
84 | 84 |
85 /** | 85 /** |
86 * @param {function(boolean)} callback | 86 * @param {function(boolean)} callback |
87 */ | 87 */ |
88 isEmpty: function(callback) { }, | 88 isEmpty: function(callback) { }, |
89 | 89 |
90 /** | 90 /** |
91 * @param {number} startPosition | 91 * @param {number} startPosition |
92 * @param {number} endPosition | 92 * @param {number} endPosition |
93 * @param {function(!WebInspector.HeapSnapshotCommon.ItemsRange)} callback | 93 * @param {function(!WebInspector.HeapSnapshotCommon.ItemsRange)} callback |
94 */ | 94 */ |
95 serializeItemsRange: function(startPosition, endPosition, callback) { }, | 95 serializeItemsRange: function(startPosition, endPosition, callback) { }, |
96 | 96 |
97 /** | 97 /** |
98 * @param {!WebInspector.HeapSnapshotCommon.ComparatorConfig} comparator | 98 * @param {!WebInspector.HeapSnapshotCommon.ComparatorConfig} comparator |
99 * @return {!Promise<?>} | 99 * @return {!Promise<?>} |
100 */ | 100 */ |
101 sortAndRewind: function(comparator) { } | 101 sortAndRewind: function(comparator) { } |
102 } | 102 }; |
103 | 103 |
104 | 104 |
105 WebInspector.HeapSnapshotGridNode.prototype = { | 105 WebInspector.HeapSnapshotGridNode.prototype = { |
106 /** | 106 /** |
107 * @return {!WebInspector.HeapSnapshotSortableDataGrid} | 107 * @return {!WebInspector.HeapSnapshotSortableDataGrid} |
108 */ | 108 */ |
109 heapSnapshotDataGrid: function() | 109 heapSnapshotDataGrid: function() |
110 { | 110 { |
111 return this._dataGrid; | 111 return this._dataGrid; |
112 }, | 112 }, |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 } | 481 } |
482 var instanceCount = this._instanceCount; | 482 var instanceCount = this._instanceCount; |
483 this._instanceCount = 0; | 483 this._instanceCount = 0; |
484 this._populateChildren(0, instanceCount, afterPopulate.bind(this)); | 484 this._populateChildren(0, instanceCount, afterPopulate.bind(this)); |
485 } | 485 } |
486 | 486 |
487 this._provider().sortAndRewind(this.comparator()).then(afterSort.bind(th
is)); | 487 this._provider().sortAndRewind(this.comparator()).then(afterSort.bind(th
is)); |
488 }, | 488 }, |
489 | 489 |
490 __proto__: WebInspector.DataGridNode.prototype | 490 __proto__: WebInspector.DataGridNode.prototype |
491 } | 491 }; |
492 | 492 |
493 | 493 |
494 /** | 494 /** |
495 * @constructor | 495 * @constructor |
496 * @extends {WebInspector.HeapSnapshotGridNode} | 496 * @extends {WebInspector.HeapSnapshotGridNode} |
497 * @param {!WebInspector.HeapSnapshotSortableDataGrid} dataGrid | 497 * @param {!WebInspector.HeapSnapshotSortableDataGrid} dataGrid |
498 * @param {!WebInspector.HeapSnapshotCommon.Node} node | 498 * @param {!WebInspector.HeapSnapshotCommon.Node} node |
499 */ | 499 */ |
500 WebInspector.HeapSnapshotGenericObjectNode = function(dataGrid, node) | 500 WebInspector.HeapSnapshotGenericObjectNode = function(dataGrid, node) |
501 { | 501 { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 var fullURL = fullName.substring(startPos + 1, endPos).trimLeft(); | 677 var fullURL = fullName.substring(startPos + 1, endPos).trimLeft(); |
678 var url = fullURL.trimURL(); | 678 var url = fullURL.trimURL(); |
679 if (url.length > 40) | 679 if (url.length > 40) |
680 url = url.trimMiddle(40); | 680 url = url.trimMiddle(40); |
681 return fullName.substr(0, startPos + 2) + url + fullName.substr(endP
os); | 681 return fullName.substr(0, startPos + 2) + url + fullName.substr(endP
os); |
682 } else | 682 } else |
683 return fullName; | 683 return fullName; |
684 }, | 684 }, |
685 | 685 |
686 __proto__: WebInspector.HeapSnapshotGridNode.prototype | 686 __proto__: WebInspector.HeapSnapshotGridNode.prototype |
687 } | 687 }; |
688 | 688 |
689 /** | 689 /** |
690 * @constructor | 690 * @constructor |
691 * @extends {WebInspector.HeapSnapshotGenericObjectNode} | 691 * @extends {WebInspector.HeapSnapshotGenericObjectNode} |
692 * @param {!WebInspector.HeapSnapshotSortableDataGrid} dataGrid | 692 * @param {!WebInspector.HeapSnapshotSortableDataGrid} dataGrid |
693 * @param {!WebInspector.HeapSnapshotProxy} snapshot | 693 * @param {!WebInspector.HeapSnapshotProxy} snapshot |
694 * @param {!WebInspector.HeapSnapshotCommon.Edge} edge | 694 * @param {!WebInspector.HeapSnapshotCommon.Edge} edge |
695 * @param {?WebInspector.HeapSnapshotObjectNode} parentObjectNode | 695 * @param {?WebInspector.HeapSnapshotObjectNode} parentObjectNode |
696 */ | 696 */ |
697 WebInspector.HeapSnapshotObjectNode = function(dataGrid, snapshot, edge, parentO
bjectNode) | 697 WebInspector.HeapSnapshotObjectNode = function(dataGrid, snapshot, edge, parentO
bjectNode) |
(...skipping 10 matching lines...) Expand all Loading... |
708 this.updateHasChildren(); | 708 this.updateHasChildren(); |
709 | 709 |
710 var data = this.data; | 710 var data = this.data; |
711 data["count"] = ""; | 711 data["count"] = ""; |
712 data["addedCount"] = ""; | 712 data["addedCount"] = ""; |
713 data["removedCount"] = ""; | 713 data["removedCount"] = ""; |
714 data["countDelta"] = ""; | 714 data["countDelta"] = ""; |
715 data["addedSize"] = ""; | 715 data["addedSize"] = ""; |
716 data["removedSize"] = ""; | 716 data["removedSize"] = ""; |
717 data["sizeDelta"] = ""; | 717 data["sizeDelta"] = ""; |
718 } | 718 }; |
719 | 719 |
720 WebInspector.HeapSnapshotObjectNode.prototype = { | 720 WebInspector.HeapSnapshotObjectNode.prototype = { |
721 /** | 721 /** |
722 * @override | 722 * @override |
723 * @return {?{snapshot:!WebInspector.HeapSnapshotProxy, snapshotNodeIndex:nu
mber}} | 723 * @return {?{snapshot:!WebInspector.HeapSnapshotProxy, snapshotNodeIndex:nu
mber}} |
724 */ | 724 */ |
725 retainersDataSource: function() | 725 retainersDataSource: function() |
726 { | 726 { |
727 return {snapshot: this._snapshot, snapshotNodeIndex: this.snapshotNodeIn
dex}; | 727 return {snapshot: this._snapshot, snapshotNodeIndex: this.snapshotNodeIn
dex}; |
728 }, | 728 }, |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 | 825 |
826 /** | 826 /** |
827 * @return {string} | 827 * @return {string} |
828 */ | 828 */ |
829 _edgeNodeSeparator: function() | 829 _edgeNodeSeparator: function() |
830 { | 830 { |
831 return " :: "; | 831 return " :: "; |
832 }, | 832 }, |
833 | 833 |
834 __proto__: WebInspector.HeapSnapshotGenericObjectNode.prototype | 834 __proto__: WebInspector.HeapSnapshotGenericObjectNode.prototype |
835 } | 835 }; |
836 | 836 |
837 /** | 837 /** |
838 * @constructor | 838 * @constructor |
839 * @extends {WebInspector.HeapSnapshotObjectNode} | 839 * @extends {WebInspector.HeapSnapshotObjectNode} |
840 * @param {!WebInspector.HeapSnapshotSortableDataGrid} dataGrid | 840 * @param {!WebInspector.HeapSnapshotSortableDataGrid} dataGrid |
841 * @param {!WebInspector.HeapSnapshotProxy} snapshot | 841 * @param {!WebInspector.HeapSnapshotProxy} snapshot |
842 * @param {!WebInspector.HeapSnapshotCommon.Edge} edge | 842 * @param {!WebInspector.HeapSnapshotCommon.Edge} edge |
843 * @param {?WebInspector.HeapSnapshotRetainingObjectNode} parentRetainingObjectN
ode | 843 * @param {?WebInspector.HeapSnapshotRetainingObjectNode} parentRetainingObjectN
ode |
844 */ | 844 */ |
845 WebInspector.HeapSnapshotRetainingObjectNode = function(dataGrid, snapshot, edge
, parentRetainingObjectNode) | 845 WebInspector.HeapSnapshotRetainingObjectNode = function(dataGrid, snapshot, edge
, parentRetainingObjectNode) |
846 { | 846 { |
847 WebInspector.HeapSnapshotObjectNode.call(this, dataGrid, snapshot, edge, par
entRetainingObjectNode); | 847 WebInspector.HeapSnapshotObjectNode.call(this, dataGrid, snapshot, edge, par
entRetainingObjectNode); |
848 } | 848 }; |
849 | 849 |
850 WebInspector.HeapSnapshotRetainingObjectNode.prototype = { | 850 WebInspector.HeapSnapshotRetainingObjectNode.prototype = { |
851 /** | 851 /** |
852 * @override | 852 * @override |
853 * @return {!WebInspector.HeapSnapshotProviderProxy} | 853 * @return {!WebInspector.HeapSnapshotProviderProxy} |
854 */ | 854 */ |
855 createProvider: function() | 855 createProvider: function() |
856 { | 856 { |
857 return this._snapshot.createRetainingEdgesProvider(this.snapshotNodeInde
x); | 857 return this._snapshot.createRetainingEdgesProvider(this.snapshotNodeInde
x); |
858 }, | 858 }, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 var retainer = this.children[0]; | 905 var retainer = this.children[0]; |
906 if (retainer._distance > 1) { | 906 if (retainer._distance > 1) { |
907 retainer._expandRetainersChain(maxExpandLevels); | 907 retainer._expandRetainersChain(maxExpandLevels); |
908 return; | 908 return; |
909 } | 909 } |
910 } | 910 } |
911 this._dataGrid.dispatchEventToListeners(WebInspector.HeapSnapshotRetainm
entDataGrid.Events.ExpandRetainersComplete); | 911 this._dataGrid.dispatchEventToListeners(WebInspector.HeapSnapshotRetainm
entDataGrid.Events.ExpandRetainersComplete); |
912 }, | 912 }, |
913 | 913 |
914 __proto__: WebInspector.HeapSnapshotObjectNode.prototype | 914 __proto__: WebInspector.HeapSnapshotObjectNode.prototype |
915 } | 915 }; |
916 | 916 |
917 /** | 917 /** |
918 * @constructor | 918 * @constructor |
919 * @extends {WebInspector.HeapSnapshotGenericObjectNode} | 919 * @extends {WebInspector.HeapSnapshotGenericObjectNode} |
920 * @param {!WebInspector.HeapSnapshotSortableDataGrid} dataGrid | 920 * @param {!WebInspector.HeapSnapshotSortableDataGrid} dataGrid |
921 * @param {!WebInspector.HeapSnapshotProxy} snapshot | 921 * @param {!WebInspector.HeapSnapshotProxy} snapshot |
922 * @param {!WebInspector.HeapSnapshotCommon.Node} node | 922 * @param {!WebInspector.HeapSnapshotCommon.Node} node |
923 * @param {boolean} isDeletedNode | 923 * @param {boolean} isDeletedNode |
924 */ | 924 */ |
925 WebInspector.HeapSnapshotInstanceNode = function(dataGrid, snapshot, node, isDel
etedNode) | 925 WebInspector.HeapSnapshotInstanceNode = function(dataGrid, snapshot, node, isDel
etedNode) |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 count: ["!edgeName", true, "retainedSize", false], | 1005 count: ["!edgeName", true, "retainedSize", false], |
1006 addedSize: ["selfSize", sortAscending, "!edgeName", true], | 1006 addedSize: ["selfSize", sortAscending, "!edgeName", true], |
1007 removedSize: ["selfSize", sortAscending, "!edgeName", true], | 1007 removedSize: ["selfSize", sortAscending, "!edgeName", true], |
1008 shallowSize: ["selfSize", sortAscending, "!edgeName", true], | 1008 shallowSize: ["selfSize", sortAscending, "!edgeName", true], |
1009 retainedSize: ["retainedSize", sortAscending, "!edgeName", true] | 1009 retainedSize: ["retainedSize", sortAscending, "!edgeName", true] |
1010 }[sortColumnIdentifier] || ["!edgeName", true, "retainedSize", false]; | 1010 }[sortColumnIdentifier] || ["!edgeName", true, "retainedSize", false]; |
1011 return WebInspector.HeapSnapshotGridNode.createComparator(sortFields); | 1011 return WebInspector.HeapSnapshotGridNode.createComparator(sortFields); |
1012 }, | 1012 }, |
1013 | 1013 |
1014 __proto__: WebInspector.HeapSnapshotGenericObjectNode.prototype | 1014 __proto__: WebInspector.HeapSnapshotGenericObjectNode.prototype |
1015 } | 1015 }; |
1016 | 1016 |
1017 /** | 1017 /** |
1018 * @constructor | 1018 * @constructor |
1019 * @param {!WebInspector.HeapSnapshotConstructorsDataGrid} dataGrid | 1019 * @param {!WebInspector.HeapSnapshotConstructorsDataGrid} dataGrid |
1020 * @param {string} className | 1020 * @param {string} className |
1021 * @param {!WebInspector.HeapSnapshotCommon.Aggregate} aggregate | 1021 * @param {!WebInspector.HeapSnapshotCommon.Aggregate} aggregate |
1022 * @param {!WebInspector.HeapSnapshotCommon.NodeFilter} nodeFilter | 1022 * @param {!WebInspector.HeapSnapshotCommon.NodeFilter} nodeFilter |
1023 * @extends {WebInspector.HeapSnapshotGridNode} | 1023 * @extends {WebInspector.HeapSnapshotGridNode} |
1024 */ | 1024 */ |
1025 WebInspector.HeapSnapshotConstructorNode = function(dataGrid, className, aggrega
te, nodeFilter) | 1025 WebInspector.HeapSnapshotConstructorNode = function(dataGrid, className, aggrega
te, nodeFilter) |
(...skipping 14 matching lines...) Expand all Loading... |
1040 this.data = { | 1040 this.data = { |
1041 "object": className, | 1041 "object": className, |
1042 "count": Number.withThousandsSeparator(this._count), | 1042 "count": Number.withThousandsSeparator(this._count), |
1043 "distance": this._toUIDistance(this._distance), | 1043 "distance": this._toUIDistance(this._distance), |
1044 "shallowSize": Number.withThousandsSeparator(this._shallowSize), | 1044 "shallowSize": Number.withThousandsSeparator(this._shallowSize), |
1045 "retainedSize": Number.withThousandsSeparator(this._retainedSize), | 1045 "retainedSize": Number.withThousandsSeparator(this._retainedSize), |
1046 "count-percent": this._toPercentString(countPercent), | 1046 "count-percent": this._toPercentString(countPercent), |
1047 "shallowSize-percent": this._toPercentString(shallowSizePercent), | 1047 "shallowSize-percent": this._toPercentString(shallowSizePercent), |
1048 "retainedSize-percent": this._toPercentString(retainedSizePercent) | 1048 "retainedSize-percent": this._toPercentString(retainedSizePercent) |
1049 }; | 1049 }; |
1050 } | 1050 }; |
1051 | 1051 |
1052 WebInspector.HeapSnapshotConstructorNode.prototype = { | 1052 WebInspector.HeapSnapshotConstructorNode.prototype = { |
1053 /** | 1053 /** |
1054 * @override | 1054 * @override |
1055 * @return {!WebInspector.HeapSnapshotProviderProxy} | 1055 * @return {!WebInspector.HeapSnapshotProviderProxy} |
1056 */ | 1056 */ |
1057 createProvider: function() | 1057 createProvider: function() |
1058 { | 1058 { |
1059 return this._dataGrid.snapshot.createNodesProviderForClass(this._name, t
his._nodeFilter) | 1059 return this._dataGrid.snapshot.createNodesProviderForClass(this._name, t
his._nodeFilter); |
1060 }, | 1060 }, |
1061 | 1061 |
1062 /** | 1062 /** |
1063 * @param {number} snapshotObjectId | 1063 * @param {number} snapshotObjectId |
1064 * @return {!Promise<!Array<!WebInspector.HeapSnapshotGridNode>>} | 1064 * @return {!Promise<!Array<!WebInspector.HeapSnapshotGridNode>>} |
1065 */ | 1065 */ |
1066 populateNodeBySnapshotObjectId: function(snapshotObjectId) | 1066 populateNodeBySnapshotObjectId: function(snapshotObjectId) |
1067 { | 1067 { |
1068 /** | 1068 /** |
1069 * @this {WebInspector.HeapSnapshotConstructorNode} | 1069 * @this {WebInspector.HeapSnapshotConstructorNode} |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1171 /** | 1171 /** |
1172 * @param {!WebInspector.HeapSnapshotInstanceNode} childNode | 1172 * @param {!WebInspector.HeapSnapshotInstanceNode} childNode |
1173 * @return {number} | 1173 * @return {number} |
1174 */ | 1174 */ |
1175 _childHashForNode: function(childNode) | 1175 _childHashForNode: function(childNode) |
1176 { | 1176 { |
1177 return childNode.snapshotNodeId; | 1177 return childNode.snapshotNodeId; |
1178 }, | 1178 }, |
1179 | 1179 |
1180 __proto__: WebInspector.HeapSnapshotGridNode.prototype | 1180 __proto__: WebInspector.HeapSnapshotGridNode.prototype |
1181 } | 1181 }; |
1182 | 1182 |
1183 | 1183 |
1184 /** | 1184 /** |
1185 * @constructor | 1185 * @constructor |
1186 * @implements {WebInspector.HeapSnapshotGridNode.ChildrenProvider} | 1186 * @implements {WebInspector.HeapSnapshotGridNode.ChildrenProvider} |
1187 * @param {!WebInspector.HeapSnapshotProviderProxy} addedNodesProvider | 1187 * @param {!WebInspector.HeapSnapshotProviderProxy} addedNodesProvider |
1188 * @param {!WebInspector.HeapSnapshotProviderProxy} deletedNodesProvider | 1188 * @param {!WebInspector.HeapSnapshotProviderProxy} deletedNodesProvider |
1189 * @param {number} addedCount | 1189 * @param {number} addedCount |
1190 * @param {number} removedCount | 1190 * @param {number} removedCount |
1191 */ | 1191 */ |
1192 WebInspector.HeapSnapshotDiffNodesProvider = function(addedNodesProvider, delete
dNodesProvider, addedCount, removedCount) | 1192 WebInspector.HeapSnapshotDiffNodesProvider = function(addedNodesProvider, delete
dNodesProvider, addedCount, removedCount) |
1193 { | 1193 { |
1194 this._addedNodesProvider = addedNodesProvider; | 1194 this._addedNodesProvider = addedNodesProvider; |
1195 this._deletedNodesProvider = deletedNodesProvider; | 1195 this._deletedNodesProvider = deletedNodesProvider; |
1196 this._addedCount = addedCount; | 1196 this._addedCount = addedCount; |
1197 this._removedCount = removedCount; | 1197 this._removedCount = removedCount; |
1198 } | 1198 }; |
1199 | 1199 |
1200 WebInspector.HeapSnapshotDiffNodesProvider.prototype = { | 1200 WebInspector.HeapSnapshotDiffNodesProvider.prototype = { |
1201 /** | 1201 /** |
1202 * @override | 1202 * @override |
1203 */ | 1203 */ |
1204 dispose: function() | 1204 dispose: function() |
1205 { | 1205 { |
1206 this._addedNodesProvider.dispose(); | 1206 this._addedNodesProvider.dispose(); |
1207 this._deletedNodesProvider.dispose(); | 1207 this._deletedNodesProvider.dispose(); |
1208 }, | 1208 }, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 this._deletedIndexes = diffForClass.deletedIndexes; | 1325 this._deletedIndexes = diffForClass.deletedIndexes; |
1326 this.data = { | 1326 this.data = { |
1327 "object": className, | 1327 "object": className, |
1328 "addedCount": Number.withThousandsSeparator(this._addedCount), | 1328 "addedCount": Number.withThousandsSeparator(this._addedCount), |
1329 "removedCount": Number.withThousandsSeparator(this._removedCount), | 1329 "removedCount": Number.withThousandsSeparator(this._removedCount), |
1330 "countDelta": this._signForDelta(this._countDelta) + Number.withThousan
dsSeparator(Math.abs(this._countDelta)), | 1330 "countDelta": this._signForDelta(this._countDelta) + Number.withThousan
dsSeparator(Math.abs(this._countDelta)), |
1331 "addedSize": Number.withThousandsSeparator(this._addedSize), | 1331 "addedSize": Number.withThousandsSeparator(this._addedSize), |
1332 "removedSize": Number.withThousandsSeparator(this._removedSize), | 1332 "removedSize": Number.withThousandsSeparator(this._removedSize), |
1333 "sizeDelta": this._signForDelta(this._sizeDelta) + Number.withThousandsS
eparator(Math.abs(this._sizeDelta)) | 1333 "sizeDelta": this._signForDelta(this._sizeDelta) + Number.withThousandsS
eparator(Math.abs(this._sizeDelta)) |
1334 }; | 1334 }; |
1335 } | 1335 }; |
1336 | 1336 |
1337 WebInspector.HeapSnapshotDiffNode.prototype = { | 1337 WebInspector.HeapSnapshotDiffNode.prototype = { |
1338 /** | 1338 /** |
1339 * @override | 1339 * @override |
1340 * @return {!WebInspector.HeapSnapshotDiffNodesProvider} | 1340 * @return {!WebInspector.HeapSnapshotDiffNodesProvider} |
1341 */ | 1341 */ |
1342 createProvider: function() | 1342 createProvider: function() |
1343 { | 1343 { |
1344 var tree = this._dataGrid; | 1344 var tree = this._dataGrid; |
1345 return new WebInspector.HeapSnapshotDiffNodesProvider( | 1345 return new WebInspector.HeapSnapshotDiffNodesProvider( |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 { | 1424 { |
1425 if (delta === 0) | 1425 if (delta === 0) |
1426 return ""; | 1426 return ""; |
1427 if (delta > 0) | 1427 if (delta > 0) |
1428 return "+"; | 1428 return "+"; |
1429 else | 1429 else |
1430 return "\u2212"; // Math minus sign, same width as plus. | 1430 return "\u2212"; // Math minus sign, same width as plus. |
1431 }, | 1431 }, |
1432 | 1432 |
1433 __proto__: WebInspector.HeapSnapshotGridNode.prototype | 1433 __proto__: WebInspector.HeapSnapshotGridNode.prototype |
1434 } | 1434 }; |
1435 | 1435 |
1436 | 1436 |
1437 /** | 1437 /** |
1438 * @constructor | 1438 * @constructor |
1439 * @extends {WebInspector.HeapSnapshotGridNode} | 1439 * @extends {WebInspector.HeapSnapshotGridNode} |
1440 * @param {!WebInspector.AllocationDataGrid} dataGrid | 1440 * @param {!WebInspector.AllocationDataGrid} dataGrid |
1441 * @param {!WebInspector.HeapSnapshotCommon.SerializedAllocationNode} data | 1441 * @param {!WebInspector.HeapSnapshotCommon.SerializedAllocationNode} data |
1442 */ | 1442 */ |
1443 WebInspector.AllocationGridNode = function(dataGrid, data) | 1443 WebInspector.AllocationGridNode = function(dataGrid, data) |
1444 { | 1444 { |
1445 WebInspector.HeapSnapshotGridNode.call(this, dataGrid, data.hasChildren); | 1445 WebInspector.HeapSnapshotGridNode.call(this, dataGrid, data.hasChildren); |
1446 this._populated = false; | 1446 this._populated = false; |
1447 this._allocationNode = data; | 1447 this._allocationNode = data; |
1448 this.data = { | 1448 this.data = { |
1449 "liveCount": Number.withThousandsSeparator(data.liveCount), | 1449 "liveCount": Number.withThousandsSeparator(data.liveCount), |
1450 "count": Number.withThousandsSeparator(data.count), | 1450 "count": Number.withThousandsSeparator(data.count), |
1451 "liveSize": Number.withThousandsSeparator(data.liveSize), | 1451 "liveSize": Number.withThousandsSeparator(data.liveSize), |
1452 "size": Number.withThousandsSeparator(data.size), | 1452 "size": Number.withThousandsSeparator(data.size), |
1453 "name": data.name | 1453 "name": data.name |
1454 }; | 1454 }; |
1455 } | 1455 }; |
1456 | 1456 |
1457 WebInspector.AllocationGridNode.prototype = { | 1457 WebInspector.AllocationGridNode.prototype = { |
1458 populate: function() | 1458 populate: function() |
1459 { | 1459 { |
1460 if (this._populated) | 1460 if (this._populated) |
1461 return; | 1461 return; |
1462 this._populated = true; | 1462 this._populated = true; |
1463 this._dataGrid.snapshot.allocationNodeCallers(this._allocationNode.id, d
idReceiveCallers.bind(this)); | 1463 this._dataGrid.snapshot.allocationNodeCallers(this._allocationNode.id, d
idReceiveCallers.bind(this)); |
1464 | 1464 |
1465 /** | 1465 /** |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1522 | 1522 |
1523 /** | 1523 /** |
1524 * @return {number} | 1524 * @return {number} |
1525 */ | 1525 */ |
1526 allocationNodeId: function() | 1526 allocationNodeId: function() |
1527 { | 1527 { |
1528 return this._allocationNode.id; | 1528 return this._allocationNode.id; |
1529 }, | 1529 }, |
1530 | 1530 |
1531 __proto__: WebInspector.HeapSnapshotGridNode.prototype | 1531 __proto__: WebInspector.HeapSnapshotGridNode.prototype |
1532 } | 1532 }; |
OLD | NEW |