[webkit-changes] [WebKit/WebKit] 8572ca: REGRESSION(266850 at main): imported/w3c/web-platform...

Chris Dumez noreply at github.com
Wed Oct 18 22:00:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8572ca9d273c14ebb16289eca2c8ed80af9edb5b
      https://github.com/WebKit/WebKit/commit/8572ca9d273c14ebb16289eca2c8ed80af9edb5b
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-10-18 (Wed, 18 Oct 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/Modules/cookie-store/CookieStore.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/platform/network/NetworkStorageSession.h
    M Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
    M Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
    M Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
    M Source/WebKit/WebProcess/WebPage/WebCookieCache.cpp
    M Source/WebKit/WebProcess/WebPage/WebCookieCache.h
    M Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp

  Log Message:
  -----------
  REGRESSION(266850 at main): imported/w3c/web-platform-tests/cookie-store/change_eventhandler_for_document_cookie.https.window.html is a consistent failure.
https://bugs.webkit.org/show_bug.cgi?id=260103
rdar://114112210

Reviewed by Sihui Liu.

We have 2 caches for cookies, a cache for the cookie string inside Document and
a fuller in-memory cookie storage in WebCookieCache.

The new cookie store API was ignoring those caches and document.cookie could
thus return outdated cookies from those caches. To address the issue, when a
cookie gets added/removed via the cookie-store API, we now clear the cached
cookie string on the Document. We also add set the cookie in the
WebCookieCache, like it done when setting a cookie via the Document.cookie
API.

This addresses the flakiness.

* LayoutTests/TestExpectations:
* Source/WebCore/Modules/cookie-store/CookieStore.cpp:
(WebCore::CookieStore::MainThreadBridge::set):
* Source/WebCore/dom/Document.h:
(WebCore::Document::isDOMCookieCacheValid const):
* Source/WebCore/platform/network/NetworkStorageSession.h:
* Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::setCookieFromDOM const):
* Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp:
(WebCore::NetworkStorageSession::setCookieFromDOM const):
* Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::setCookieFromDOM const):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::setCookieFromDOMAsync):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/WebProcess/WebPage/WebCookieCache.cpp:
(WebKit::WebCookieCache::setCookieFromDOM):
* Source/WebKit/WebProcess/WebPage/WebCookieCache.h:
* Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp:
(WebKit::WebCookieJar::setCookieAsync const):

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




More information about the webkit-changes mailing list