Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0148d3419af1784ee6a6350d9fd49ddf58d824c8
https://github.com/WebKit/WebKit/commit/0148d3419af1784ee6a6350d9fd49ddf58d824c8
Author: Timothy Hatcher <[email protected]>
Date: 2026-05-22 (Fri, 22 May 2026)
Changed paths:
M Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPICookies.mm
Log Message:
-----------
Web Extensions: cookies.get() and cookies.getAll() have empty results on
first launch.
https://webkit.org/b/315310
rdar://177380008
Reviewed by Brian Weinstein.
When the network process hasn't launched yet — as is common on the first cookie
query after
app launch — the two cookie-reading methods silently returned empty results.
They now launch
the network process on demand, consistent with the write and observer methods
in the same class.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPICookies.mm
* Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp:
(API::HTTPCookieStore::cookies): Use `networkProcessLaunchingIfNecessary()` to
launch the network
process on demand rather than silently returning empty results when it isn't
running.
(API::HTTPCookieStore::cookiesForURL): Ditto.
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPICookies.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPICookies,
GetAllAfterNetworkProcessTermination)):
Added. Verifies `browser.cookies.getAll()` returns persisted cookies after the
network process is
killed, simulating a cold-start scenario.
Canonical link: https://commits.webkit.org/313745@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications