summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/WebRequest.cpp
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-08-11 10:22:40 +0100
committerKristian Monsen <kristianm@google.com>2010-08-11 11:21:25 +0100
commit21baf41667f5ac764512f0168a702390daf45bf3 (patch)
tree68bf2e1e67aacde6c5a61e905d8803c09c039795 /WebKit/android/WebCoreSupport/WebRequest.cpp
parentb69fcd13ce2c9cf0b62243d9eaffd47f77e801c0 (diff)
downloadexternal_webkit-21baf41667f5ac764512f0168a702390daf45bf3.zip
external_webkit-21baf41667f5ac764512f0168a702390daf45bf3.tar.gz
external_webkit-21baf41667f5ac764512f0168a702390daf45bf3.tar.bz2
Send didFail to webcore for failed requests.
Also removed the member variable m_resourceRequest as it is not needed outside the function. Change-Id: I5a627306de8a8d8c59044046003e8515fd10f5c8
Diffstat (limited to 'WebKit/android/WebCoreSupport/WebRequest.cpp')
-rw-r--r--WebKit/android/WebCoreSupport/WebRequest.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/WebKit/android/WebCoreSupport/WebRequest.cpp b/WebKit/android/WebCoreSupport/WebRequest.cpp
index 811cd3f..4030160 100644
--- a/WebKit/android/WebCoreSupport/WebRequest.cpp
+++ b/WebKit/android/WebCoreSupport/WebRequest.cpp
@@ -63,10 +63,16 @@ WebRequest::~WebRequest()
{
}
-void WebRequest::finish(bool /*success*/)
+void WebRequest::finish(bool success)
{
- LoaderData* loaderData = new LoaderData(m_urlLoader);
- callOnMainThread(WebUrlLoaderClient::didFinishLoading, loaderData);
+ if (success) {
+ LoaderData* loaderData = new LoaderData(m_urlLoader);
+ callOnMainThread(WebUrlLoaderClient::didFinishLoading, loaderData);
+ } else {
+ WebResponse webResponse(m_request.get());
+ LoaderData* loaderData = new LoaderData(m_urlLoader, webResponse);
+ callOnMainThread(WebUrlLoaderClient::didFail, loaderData);
+ }
m_networkBuffer = 0;
m_request = 0;
}