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

Unified Diff: net/base/file_stream_context_posix.cc

Issue 942633004: IndexedDB: Fixed support for empty blobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | storage/browser/blob/blob_data_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream_context_posix.cc
diff --git a/net/base/file_stream_context_posix.cc b/net/base/file_stream_context_posix.cc
index 44f59b1ef3b82c9b3032edcbef331901dbc4e518..268fe92e942074acf653cf25efbe74f53fd84b2d 100644
--- a/net/base/file_stream_context_posix.cc
+++ b/net/base/file_stream_context_posix.cc
@@ -103,6 +103,8 @@ FileStream::Context::IOResult FileStream::Context::ReadFileImpl(
FileStream::Context::IOResult FileStream::Context::WriteFileImpl(
scoped_refptr<IOBuffer> buf,
int buf_len) {
+ if (buf_len == 0)
jsbell 2015/02/24 18:37:36 Can you explain why we need this special case? Doe
cmumford 2015/02/24 22:40:52 buf refers to a NULL IOBuffer in this case. So ope
jsbell 2015/02/25 00:10:30 Although you took a different approach, it is weir
+ return IOResult(0, 0);
int res = file_.WriteAtCurrentPosNoBestEffort(buf->data(), buf_len);
if (res == -1)
return IOResult::FromOSError(errno);
« no previous file with comments | « no previous file | storage/browser/blob/blob_data_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698