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

Unified Diff: net/base/file_stream_context.cc

Issue 250783002: net: Make sure the FileStream file is closed on the worker thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use an explicit worker pool Created 6 years, 8 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 | net/base/file_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream_context.cc
diff --git a/net/base/file_stream_context.cc b/net/base/file_stream_context.cc
index 13467ec7c6274ab337c687a16983b0bbced28b97..487144e77bad3509a939d6c0178a74874fdc2b0e 100644
--- a/net/base/file_stream_context.cc
+++ b/net/base/file_stream_context.cc
@@ -182,10 +182,10 @@ FileStream::Context::IOResult FileStream::Context::CloseFileImpl() {
void FileStream::Context::OnOpenCompleted(const CompletionCallback& callback,
OpenResult open_result) {
- if (open_result.file.IsValid() && !orphaned_) {
- file_ = open_result.file.Pass();
+ file_ = open_result.file.Pass();
+ if (file_.IsValid() && !orphaned_)
OnAsyncFileOpened();
- }
+
OnAsyncCompleted(IntToInt64(callback), open_result.error_code);
}
« no previous file with comments | « no previous file | net/base/file_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698