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

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/ProfileView.js

Issue 2444223002: [Devtools] Cleanup DataGrid's typecast and identifier naming (Closed)
Patch Set: changes Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/profiler/ProfileView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/ProfileView.js b/third_party/WebKit/Source/devtools/front_end/profiler/ProfileView.js
index 81d4037b27650ad2690d93fa7473e979d110b2c6..0d739ab4a8996c78a81261be07b1d18e7a73db8d 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/ProfileView.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/ProfileView.js
@@ -25,7 +25,7 @@ WebInspector.ProfileView = function(nodeFormatter, viewTypes)
this._viewType = WebInspector.settings.createSetting("profileView", WebInspector.ProfileView.ViewTypes.Heavy);
this._nodeFormatter = nodeFormatter;
- var columns = [];
+ var columns = /** @type {!Array<!WebInspector.DataGrid.ColumnDescriptor>} */ ([]);
columns.push({id: "self", title: this.columnHeader("self"), width: "120px", fixedWidth: true, sortable: true, sort: WebInspector.DataGrid.Order.Descending});
columns.push({id: "total", title: this.columnHeader("total"), width: "120px", fixedWidth: true, sortable: true});
columns.push({id: "function", title: WebInspector.UIString("Function"), disclosure: true, sortable: true});
@@ -375,8 +375,8 @@ WebInspector.ProfileView.prototype = {
_sortProfile: function()
{
var sortAscending = this.dataGrid.isSortOrderAscending();
- var sortColumnIdentifier = this.dataGrid.sortColumnIdentifier();
- var sortProperty = sortColumnIdentifier === "function" ? "functionName" : sortColumnIdentifier || "";
+ var sortColumnId = this.dataGrid.sortColumnId();
+ var sortProperty = sortColumnId === "function" ? "functionName" : sortColumnId || "";
this.profileDataGridTree.sort(WebInspector.ProfileDataGridTree.propertyComparator(sortProperty, sortAscending));
this.refresh();

Powered by Google App Engine
This is Rietveld 408576698