diff options
author | Selim Gurun <sgurun@google.com> | 2012-08-31 10:53:04 -0700 |
---|---|---|
committer | Selim Gurun <sgurun@google.com> | 2012-08-31 10:53:04 -0700 |
commit | 7151ed0c74599db4d9b1871416814b9a05214ba6 (patch) | |
tree | 2e8dd325f0a4b1e7ac54879c421a9b05662bd19d | |
parent | 3f9aace3c8671247a9b06117658d44282871ba89 (diff) | |
download | external_webkit-7151ed0c74599db4d9b1871416814b9a05214ba6.zip external_webkit-7151ed0c74599db4d9b1871416814b9a05214ba6.tar.gz external_webkit-7151ed0c74599db4d9b1871416814b9a05214ba6.tar.bz2 |
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
-rw-r--r-- | Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<FlushSemaphore> +class FlushSemaphore : public base::RefCountedThreadSafe<FlushSemaphore> { public: FlushSemaphore() |