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

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: 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 5e62234ad338fb0bd26d66edbd0f5a3deb3d8e84..1c2093949527b945afd20e0130a8c548bff04e81 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.length > 0 ? aValues[0] : 0;
mazda 2011/11/17 06:50:56 var aValue = aValues && aValues[0] || 0;
yoshiki 2011/11/17 13:00:07 Done.
+ var bvalue = bValues && bValues.length > 0 ? bValues[0] : 0;
mazda 2011/11/17 06:50:56 Ditto
yoshiki 2011/11/17 13:00:07 Done.
+ 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