diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-23 02:08:03 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-23 02:08:03 +0000 |
commit | 9b5f0a4b60e2139bb6e80947f93f59164bb1ee17 (patch) | |
tree | 71eb04923c8cb11753723ce178b3b9c38f283eed /content/browser/tracing/tracing_ui.cc | |
parent | 5b71f1d4ffa6e2f9c6e87254f5ea825f0a49fa53 (diff) | |
download | chromium_src-9b5f0a4b60e2139bb6e80947f93f59164bb1ee17.zip chromium_src-9b5f0a4b60e2139bb6e80947f93f59164bb1ee17.tar.gz chromium_src-9b5f0a4b60e2139bb6e80947f93f59164bb1ee17.tar.bz2 |
Fix net::FileStream to handle all errors correctly.
This CL adds FileStream::Context::IOResult struct that's used to pass
results of IO operations inside FileStream::Context. Following bugs are
fixes:
1. On POSIX net::FileStream::Read() and net::FileStream::Write() would
return a positive result in case of an error. This happens because
POSIX errors are positive integers and FileStream was written with
assumption that they are negative.
2. On Windows Seek() and Flush() errors were not handled correctly.
This is because CheckForIOError() was assuming that all error codes
are negative, but RecordAndMapError() was mapping positive errors.
3. On Windows results of asynchronous ReadFile() and WriteFile() were
not handled correctly - ERR_IO_PENDING would be returned even when
operation completes synchronously.
Also added unittests to check that error codes are handled correctly
now.
Review URL: https://chromiumcodereview.appspot.com/12320003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/tracing/tracing_ui.cc')
0 files changed, 0 insertions, 0 deletions