Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 09e47e61e5b8e6a5a1dfc49e8a878d79110e4bbe
https://github.com/WebKit/WebKit/commit/09e47e61e5b8e6a5a1dfc49e8a878d79110e4bbe
Author: Basuke Suzuki <[email protected]>
Date: 2026-03-25 (Wed, 25 Mar 2026)
Changed paths:
M Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm
M Source/WebKit/UIProcess/Downloads/DownloadProxyCocoa.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm
Log Message:
-----------
Remove assertion in Download::publishProgress when bookmark data is invalid
https://bugs.webkit.org/show_bug.cgi?id=310658
rdar://160644491
Reviewed by Per Arne Vollan.
When a non-existent file URL is passed as the placeholder URL in
decidePlaceholderPolicy, bookmarkDataWithOptions: returns nil because
there is no file to create a bookmark for. The empty bookmark data is
sent to the Network Process, where URLByResolvingBookmarkData: returns
nil, hitting ASSERT(m_bookmarkURL).
The adoptNS fix in r282517 addressed one cause of nil m_bookmarkURL but
also added this assertion, which exposed the pre-existing failure mode
of invalid bookmark data.
Fix by removing the assertion (the nil case is already handled gracefully
with a release log) and adding error logging in bookmarkDataForURL so the
root cause is visible in UI process logs.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm
* Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::publishProgress):
* Source/WebKit/UIProcess/Downloads/DownloadProxyCocoa.mm:
(WebKit::DownloadProxy::bookmarkDataForURL):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
(TestWebKitAPI::PlaceholderPolicyDisableWithNonExistentPlaceholderURL)):
Canonical link: https://commits.webkit.org/309929@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications