From d4a869207d9c64cff5a8ac08cd9cddf473360504 Mon Sep 17 00:00:00 2001 From: Iain Merrick Date: Thu, 28 Oct 2010 10:39:47 +0100 Subject: Use Tasks for WebRequest -> WebUrlLoaderClient callbacks. We were using some hand-rolled boilerplate for inter-thread communication, with all data packed into the same LoaderData struct. This CL uses the Chromium utility function NewRunnableMethod to pack up the parameters, so the callback methods don't have to be static and can have different parameters. Also using smart pointers wherever possible. Testing: manually verified that both synchronous and asynchronous requests work correctly with no leaks. Will also do stress-testing to check for race conditions. Change-Id: I934a2ee795138f8eee43803a94bb7494ee73031d --- WebKit/android/WebCoreSupport/WebUrlLoader.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'WebKit/android/WebCoreSupport/WebUrlLoader.h') diff --git a/WebKit/android/WebCoreSupport/WebUrlLoader.h b/WebKit/android/WebCoreSupport/WebUrlLoader.h index 7106ede..2e76c14 100644 --- a/WebKit/android/WebCoreSupport/WebUrlLoader.h +++ b/WebKit/android/WebCoreSupport/WebUrlLoader.h @@ -26,6 +26,7 @@ #ifndef WebUrlLoader_h #define WebUrlLoader_h +#include "ChromiumIncludes.h" #include "ResourceLoaderAndroid.h" using namespace WebCore; @@ -47,7 +48,7 @@ private: WebUrlLoader(WebFrame*, WebCore::ResourceHandle*, const WebCore::ResourceRequest&); static PassRefPtr create(WebFrame*, WebCore::ResourceHandle*, const WebCore::ResourceRequest&); - OwnPtr m_loaderClient; + scoped_refptr m_loaderClient; }; } // namespace android -- cgit v1.1