Index: ui/file_manager/file_manager/common/js/util.js |
diff --git a/ui/file_manager/file_manager/common/js/util.js b/ui/file_manager/file_manager/common/js/util.js |
index e6dbe422996e213a57a3f01c3be9e7651aae13e3..02620223076f1a782f543a55f66ffab5ef3e889d 100644 |
--- a/ui/file_manager/file_manager/common/js/util.js |
+++ b/ui/file_manager/file_manager/common/js/util.js |
@@ -460,7 +460,7 @@ util.AppCache.cleanup_ = function(map) { |
if (map.hasOwnProperty(key)) |
keys.push(key); |
} |
- keys.sort(function(a, b) { return map[a].expire > map[b].expire; }); |
+ keys.sort(function(a, b) { return map[a].expire - map[b].expire; }); |
var cutoff = Date.now(); |
@@ -495,7 +495,9 @@ util.loadImage = function(image, url, opt_options, opt_isValid) { |
image, |
opt_options || {}, |
function() {}, |
- function() { image.onerror(); }, |
+ function() { |
+ image.onerror(new Event('load-error')); |
+ }, |
opt_isValid); |
}; |