From 7151ed0c74599db4d9b1871416814b9a05214ba6 Mon Sep 17 00:00:00 2001 From: Selim Gurun Date: Fri, 31 Aug 2012 10:53:04 -0700 Subject: Fix potential corruption/leak in cookiejar. The flush() method of the cookie jar can be accessed from different threads. This method (eventually) creates a NewRunnableTask and a callback on FlushSemaphore object. Therefore FlushSemaphore should inherit from a ThreadSafe ref counter rather than a simple base ref counter. Change-Id: Ie6914fba9b1554081c4b3b5992661af066e23653 --- Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp b/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp index 0af3cc2..f42f307 100644 --- a/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp +++ b/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp @@ -189,7 +189,7 @@ int WebCookieJar::getNumCookiesInDatabase() return cookieStore()->GetCookieMonster()->GetAllCookies().size(); } -class FlushSemaphore : public base::RefCounted +class FlushSemaphore : public base::RefCountedThreadSafe { public: FlushSemaphore() -- cgit v1.1