Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b0d82122ac81c8a2da38b60c61eb04007d44b960
https://github.com/WebKit/WebKit/commit/b0d82122ac81c8a2da38b60c61eb04007d44b960
Author: Adrian Taylor <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M Source/WebKit/Modules/Internal/module.modulemap
M Source/WebKit/Shared/WebBackForwardListItem.h
M Source/WebKit/UIProcess/WebPageProxy.h
Log Message:
-----------
Remove SWIFT_RETURNS_INDEPENDENT_VALUE
https://bugs.webkit.org/show_bug.cgi?id=307531
rdar://170127262
Reviewed by Richard Robinson.
Wherever possible we want to avoid using the SWIFT_RETURNS_INDEPENDENT_VALUE
annotation, because experience has shown it can be error-prone.
In this commit we remove its use from core WebKit.
Three techniques have allowed its removal in this PR:
* For functions which return pointers: if Swift is aware that a type is a
SWIFT_SHARED_REFERENCE, then no SWIFT_RETURNS_INDEPENDENT_VALUE is
needed. In some cases, Swift was already aware, so we could just remove
the annotation.
* In one other case, Swift becomes aware of that fact so long as it can
see an extra file in the WebKit_Internal modulemap.
* For functions that return references, unfortunately that doesn't work
due to a bug rdar://168057355. In these cases, we temporarily have
to add extra functions that return pointers instead.
Canonical link: https://commits.webkit.org/307713@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications