Title: [144804] trunk/Source/WebCore
Revision
144804
Author
commit-qu...@webkit.org
Date
2013-03-05 13:08:29 -0800 (Tue, 05 Mar 2013)

Log Message

[BlackBerry] Fix assertion in CookieManager::getBackingStoreCookies
https://bugs.webkit.org/show_bug.cgi?id=111468

Patch by Otto Derek Cheung <otche...@rim.com> on 2013-03-05
Reviewed by Rob Buis.
Internally reviewed by Konrad Piascik.

The assert in getBackingStoreCookies could be giving out false positives now
that we have our fixes for cookie loading in PR 286189. The cookie store could
be half loaded if the first cookie get/set call happens before the db is fully loaded.
A full webkit sync call to reload the database will cause the assert to be hit.

Safer to flush everything out and try again.

* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::getBackingStoreCookies):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (144803 => 144804)


--- trunk/Source/WebCore/ChangeLog	2013-03-05 21:07:53 UTC (rev 144803)
+++ trunk/Source/WebCore/ChangeLog	2013-03-05 21:08:29 UTC (rev 144804)
@@ -1,3 +1,21 @@
+2013-03-05  Otto Derek Cheung  <otche...@rim.com>
+
+        [BlackBerry] Fix assertion in CookieManager::getBackingStoreCookies
+        https://bugs.webkit.org/show_bug.cgi?id=111468
+
+        Reviewed by Rob Buis.
+        Internally reviewed by Konrad Piascik.
+
+        The assert in getBackingStoreCookies could be giving out false positives now
+        that we have our fixes for cookie loading in PR 286189. The cookie store could
+        be half loaded if the first cookie get/set call happens before the db is fully loaded.
+        A full webkit sync call to reload the database will cause the assert to be hit.
+
+        Safer to flush everything out and try again.
+
+        * platform/blackberry/CookieManager.cpp:
+        (WebCore::CookieManager::getBackingStoreCookies):
+
 2013-03-05  Tony Gentilcore  <to...@chromium.org>
 
         CompactHTMLToken does not need an XSSInfo pointer

Modified: trunk/Source/WebCore/platform/blackberry/CookieManager.cpp (144803 => 144804)


--- trunk/Source/WebCore/platform/blackberry/CookieManager.cpp	2013-03-05 21:07:53 UTC (rev 144803)
+++ trunk/Source/WebCore/platform/blackberry/CookieManager.cpp	2013-03-05 21:08:29 UTC (rev 144804)
@@ -512,9 +512,9 @@
     if (m_privateMode)
         return;
 
-    // This method should be called just after having created the cookieManager
-    // NEVER afterwards!
-    ASSERT(!m_count);
+    // If there exists cookies in memory, flush them out and we'll load everything from the database again
+    if (m_count)
+        removeAllCookies(DoNotRemoveFromBackingStore);
 
     Vector<ParsedCookie*> cookies;
     m_cookieBackingStore->getCookiesFromDatabase(cookies);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to