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

Unified Diff: chrome/browser/resources/task_manager/main.js

Issue 8486014: WebUI TaskManager: Make sort rows including "N/A" correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/task_manager/main.js
diff --git a/chrome/browser/resources/task_manager/main.js b/chrome/browser/resources/task_manager/main.js
index a397ecf0cd31cbee420542c335fd4ef852a3a8c5..5df154a73a69e6fd9983d8e05c88c2708c8fa2ab 100644
--- a/chrome/browser/resources/task_manager/main.js
+++ b/chrome/browser/resources/task_manager/main.js
@@ -193,8 +193,11 @@ TaskManager.prototype = {
var compare_func = function() {
var value_id = column_id + 'Value';
return function(a, b) {
- return dm.defaultValuesCompareFunction(a[value_id][0],
- b[value_id][0]);
+ var aValues = a[value_id];
+ var bValues = b[value_id];
+ var aValue = aValues && aValues[0] || 0;
+ var bvalue = bValues && bValues[0] || 0;
+ return dm.defaultValuesCompareFunction(aValue, bvalue);
};
}();
dm.setCompareFunction(column_id, compare_func);
« 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