Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8f3f6d87a146738ce7427629df259357af616f96
https://github.com/WebKit/WebKit/commit/8f3f6d87a146738ce7427629df259357af616f96
Author: Adrian Taylor <[email protected]>
Date: 2026-01-28 (Wed, 28 Jan 2026)
Changed paths:
M Source/WebKit/Shared/WebBackForwardListItem.h
M Source/WebKit/UIProcess/SuspendedPageProxy.h
M Source/WebKit/UIProcess/WebBackForwardCacheEntry.h
M Source/WebKit/UIProcess/WebPageProxy.h
Log Message:
-----------
Swift WebBackForwardList (off by default) - returns by reference
https://bugs.webkit.org/show_bug.cgi?id=305483
rdar://159589815
Reviewed by Richard Robinson.
We're introducing a Swift version of the Back Forward List. For the general
design and rationale, see
https://github.com/WebKit/WebKit/pull/55393
It will be landed as a series of separate commits in order to ease code review.
This commit allows the new Swift Back Forward List to use some pre-existing
WebKit APIs which return C++ references.
C++ references as return values are generally not allowed in Swift, because
Swift cannot prove that the reference does not point to an interior value which
might be freed or modified at a time that's not visible to Swift. To guarantee
that isn't the case, we annotate these APIs in C++ with
SWIFT_RETURNS_INDEPENDENT_VALUE.
It's likely that future work will remove the need for the
SWIFT_RETURNS_INDEPENDENT_VALUE annotations here:
* rdar://168057355 may make this automatic if the return value is
a Swift reference-counted type;
* We will eventually be able to annotate all WTF::RefCountedBase types
as SWIFT_SHARED_REFERENCE (rdar://168921364)
Canonical link: https://commits.webkit.org/306346@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications