summaryrefslogtreecommitdiffstats
path: root/chrome_frame/urlmon_bind_status_callback.cc
diff options
context:
space:
mode:
authoramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-13 20:56:12 +0000
committeramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-13 20:56:12 +0000
commit642c15e020eef69301e29f2998f073d95650534d (patch)
treeda88c9f040cade83011cfd0658e17c8d32b43c0c /chrome_frame/urlmon_bind_status_callback.cc
parent939e7367d5d984efe1f402c7e5135503beaebfae (diff)
downloadchromium_src-642c15e020eef69301e29f2998f073d95650534d.zip
chromium_src-642c15e020eef69301e29f2998f073d95650534d.tar.gz
chromium_src-642c15e020eef69301e29f2998f073d95650534d.tar.bz2
Fix unit test breakage in last change.
Instead of returning E_FAIL from IStream::Read when there is no valid cache to serve content from, confirm tp the IStream Read contract and return S_FALSE with 0 bytes. TBR=stoyan TEST=MonikerPatchTest.CacheStream Review URL: http://codereview.chromium.org/2114001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/urlmon_bind_status_callback.cc')
-rw-r--r--chrome_frame/urlmon_bind_status_callback.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome_frame/urlmon_bind_status_callback.cc b/chrome_frame/urlmon_bind_status_callback.cc
index 1f39a08..5730870 100644
--- a/chrome_frame/urlmon_bind_status_callback.cc
+++ b/chrome_frame/urlmon_bind_status_callback.cc
@@ -75,8 +75,10 @@ STDMETHODIMP CacheStream::Read(void* pv, ULONG cb, ULONG* read) {
if (!pv || !read)
return E_INVALIDARG;
- if (!cache_.get())
- return E_FAIL;
+ if (!cache_.get()) {
+ *read = 0;
+ return S_FALSE;
+ }
// Default to E_PENDING to signal that this is a partial data.
HRESULT hr = eof_ ? S_FALSE : E_PENDING;