From 32552b6c77d13df635d84345f5ddb3f5854185ea Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Tue, 18 Jan 2011 16:17:21 -0500 Subject: [PATCH] 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 --- WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp index d6224e068..ed7ece76e 100644 --- a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp +++ b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp @@ -302,7 +302,7 @@ void WebUrlLoaderClient::didReceiveResponse(PassOwnPtr webResponse) void WebUrlLoaderClient::didReceiveData(scoped_refptr 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 buf, int si // For data url's void WebUrlLoaderClient::didReceiveDataUrl(PassOwnPtr str) { - if (!isActive()) + if (!isActive() || !str->size()) return; // didReceiveData will take a copy of the data @@ -323,7 +323,7 @@ void WebUrlLoaderClient::didReceiveDataUrl(PassOwnPtr str) // For special android files void WebUrlLoaderClient::didReceiveAndroidFileData(PassOwnPtr > vector) { - if (!isActive()) + if (!isActive() || !vector->size()) return; // didReceiveData will take a copy of the data -- 2.11.0