summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2011-01-18 16:17:21 -0500
committerPatrick Scott <phanna@android.com>2011-01-18 16:17:21 -0500
commit32552b6c77d13df635d84345f5ddb3f5854185ea (patch)
tree57c790737cf6c9bd122bfa8880afde0a8d6e19fc /WebKit
parentc4ae5f0659c148fe7bb241fbf4f11ed39eb5dbd7 (diff)
downloadexternal_webkit-32552b6c77d13df635d84345f5ddb3f5854185ea.zip
external_webkit-32552b6c77d13df635d84345f5ddb3f5854185ea.tar.gz
external_webkit-32552b6c77d13df635d84345f5ddb3f5854185ea.tar.bz2
Do not send empty data.
WebKit asserts that the length of data is 0 and assumes that the length is non-zero. Change-Id: Ic1e62bcfaca5b875256216ed20013f1b4ad7e653
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
index d6224e0..ed7ece7 100644
--- a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
+++ b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
@@ -302,7 +302,7 @@ void WebUrlLoaderClient::didReceiveResponse(PassOwnPtr<WebResponse> webResponse)
void WebUrlLoaderClient::didReceiveData(scoped_refptr<net::IOBuffer> buf, int size)
{
- if (!isActive())
+ if (!isActive() || !size)
return;
// didReceiveData will take a copy of the data
@@ -313,7 +313,7 @@ void WebUrlLoaderClient::didReceiveData(scoped_refptr<net::IOBuffer> buf, int si
// For data url's
void WebUrlLoaderClient::didReceiveDataUrl(PassOwnPtr<std::string> str)
{
- if (!isActive())
+ if (!isActive() || !str->size())
return;
// didReceiveData will take a copy of the data
@@ -323,7 +323,7 @@ void WebUrlLoaderClient::didReceiveDataUrl(PassOwnPtr<std::string> str)
// For special android files
void WebUrlLoaderClient::didReceiveAndroidFileData(PassOwnPtr<std::vector<char> > vector)
{
- if (!isActive())
+ if (!isActive() || !vector->size())
return;
// didReceiveData will take a copy of the data