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

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

Issue 23494034: HeapSnapshot: Sort by distance doesn't work properly for node children in Summary view. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « no previous file | 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) 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 { 805 {
806 return new WebInspector.HeapSnapshotInstanceNode(this._dataGrid, null, t his._dataGrid.snapshot, item); 806 return new WebInspector.HeapSnapshotInstanceNode(this._dataGrid, null, t his._dataGrid.snapshot, item);
807 }, 807 },
808 808
809 comparator: function() 809 comparator: function()
810 { 810 {
811 var sortAscending = this._dataGrid.isSortOrderAscending(); 811 var sortAscending = this._dataGrid.isSortOrderAscending();
812 var sortColumnIdentifier = this._dataGrid.sortColumnIdentifier(); 812 var sortColumnIdentifier = this._dataGrid.sortColumnIdentifier();
813 var sortFields = { 813 var sortFields = {
814 object: ["id", sortAscending, "retainedSize", false], 814 object: ["id", sortAscending, "retainedSize", false],
815 distance: ["distance", true, "retainedSize", false], 815 distance: ["distance", sortAscending, "retainedSize", false],
816 count: ["id", true, "retainedSize", false], 816 count: ["id", true, "retainedSize", false],
817 shallowSize: ["selfSize", sortAscending, "id", true], 817 shallowSize: ["selfSize", sortAscending, "id", true],
818 retainedSize: ["retainedSize", sortAscending, "id", true] 818 retainedSize: ["retainedSize", sortAscending, "id", true]
819 }[sortColumnIdentifier]; 819 }[sortColumnIdentifier];
820 return WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.create Comparator(sortFields); 820 return WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.create Comparator(sortFields);
821 }, 821 },
822 822
823 _childHashForEntity: function(node) 823 _childHashForEntity: function(node)
824 { 824 {
825 return node.id; 825 return node.id;
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 }, 1110 },
1111 1111
1112 _emptyData: function() 1112 _emptyData: function()
1113 { 1113 {
1114 return {}; 1114 return {};
1115 }, 1115 },
1116 1116
1117 __proto__: WebInspector.HeapSnapshotGenericObjectNode.prototype 1117 __proto__: WebInspector.HeapSnapshotGenericObjectNode.prototype
1118 } 1118 }
1119 1119
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698