Title: [294860] trunk/Source/WebKit/UIProcess/WebCookieManagerProxy.cpp
Revision
294860
Author
[email protected]
Date
2022-05-25 18:52:56 -0700 (Wed, 25 May 2022)

Log Message

REGRESSION(r294381): [ Debug ] TestWebKitAPI.WebKit.CookieObserverCrash is a constant crash
https://bugs.webkit.org/show_bug.cgi?id=240595

Reviewed by Alex Christensen.

The crash is an assertion failure. The assertion ensures that WebCookieManagerProxy has no cookies observer when it gets
destroyed. The assertion was valid when it was added, since WKHTTPCookieStore does not outlive WebKit::WebsiteDataStore
(r219550), and observers will be removed when WKHTTPCookieStore is deallocated. Since r279074, WKHTTPCookieStore can
outlive WebKit::WebsiteDataStore -- it holds a weak reference to WebKit::WebsiteDataStore instead of a strong reference,
so the assertion does not hold.

* Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::~WebCookieManagerProxy):

Canonical link: https://commits.webkit.org/250992@main

Modified Paths

Diff

Modified: trunk/Source/WebKit/UIProcess/WebCookieManagerProxy.cpp (294859 => 294860)


--- trunk/Source/WebKit/UIProcess/WebCookieManagerProxy.cpp	2022-05-26 01:48:51 UTC (rev 294859)
+++ trunk/Source/WebKit/UIProcess/WebCookieManagerProxy.cpp	2022-05-26 01:52:56 UTC (rev 294860)
@@ -49,7 +49,8 @@
 {
     if (m_networkProcess)
         m_networkProcess->removeMessageReceiver(Messages::WebCookieManagerProxy::messageReceiverName());
-    ASSERT(m_cookieObservers.isEmpty());
+    if (!m_cookieObservers.isEmpty())
+        RELEASE_LOG(Storage, "WebCookieManagerProxy::~WebCookieManagerProxy %u cookie observers will be invalidated", m_cookieObservers.size());
 }
 
 void WebCookieManagerProxy::getHostnamesWithCookies(PAL::SessionID sessionID, CompletionHandler<void(Vector<String>&&)>&& callbackFunction)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to