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

Unified Diff: content/browser/fileapi/fileapi_message_filter.cc

Issue 187393004: Keep IPC related state as long as readDirectory returns has_more==true (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | content/child/fileapi/file_system_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/fileapi/fileapi_message_filter.cc
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 97cd949cb18d776c1d693d5837749a4a07b20c89..eaf5fa146893cf27e2037aaf2b9119cf43180a24 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -732,11 +732,14 @@ void FileAPIMessageFilter::DidReadDirectory(
base::File::Error result,
const std::vector<fileapi::DirectoryEntry>& entries,
bool has_more) {
- if (result == base::File::FILE_OK)
+ if (result == base::File::FILE_OK) {
Send(new FileSystemMsg_DidReadDirectory(request_id, entries, has_more));
- else
+ } else {
+ DCHECK(!has_more);
Send(new FileSystemMsg_DidFail(request_id, result));
- operations_.erase(request_id);
+ }
+ if (!has_more)
+ operations_.erase(request_id);
}
void FileAPIMessageFilter::DidWrite(int request_id,
« no previous file with comments | « no previous file | content/child/fileapi/file_system_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698