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

Unified Diff: ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item.js

Issue 900173002: Files.app: Do not update cached MetadataCachedItemProperty before it is invalidated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 10 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
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item_unittest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item.js
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item.js b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item.js
index 663320f30de1a26b94d2096a7137db7389e6a50b..1efae04d9e4d73384a699f05bb6fced3584577bf 100644
--- a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item.js
+++ b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item.js
@@ -62,8 +62,11 @@ MetadataCacheItem.prototype.storeProperties = function(requestId, object) {
for (var name in object) {
if (!this.properties_[name])
this.properties_[name] = new MetadataCacheItemProperty();
- if (requestId < this.properties_[name].requestId)
+ if (requestId < this.properties_[name].requestId ||
+ this.properties_[name].state ===
+ MetadataCacheItemPropertyState.FULFILLED) {
continue;
+ }
changed = true;
this.properties_[name].requestId = requestId;
this.properties_[name].value = object[name];
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698