Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 27500850d0fffca493fe5133feeb2b2ec3f24ea5
https://github.com/WebKit/WebKit/commit/27500850d0fffca493fe5133feeb2b2ec3f24ea5
Author: Adrian Taylor <[email protected]>
Date: 2026-01-10 (Sat, 10 Jan 2026)
Changed paths:
M Source/WTF/wtf/Expected.h
M Source/WebCore/page/EventHandler.h
Log Message:
-----------
Exclude expected copy constructor
https://bugs.webkit.org/show_bug.cgi?id=305204
rdar://167557269
Reviewed by Richard Robinson.
Swift attempts to test for the presence of copy constructors on C++ types to
determine whether they're copyable. This does not work for some C++ templated
types and causes swift compilation to give errors like this:
wtf/Expected.h:254:11: error: call to implicitly-deleted copy constructor of
'Variant<value_type, error_type>' (aka
'variant<WebKit::JavaScriptEvaluationResult,
std::optional<WebCore::ExceptionDetails>>')
These errors start to occur as soon as any Swift code is included in WebKit
which refers to these C++ headers. This includes upcoming Swift CoreIPC
handlers.
In future Swift versions we can work around this by using the
SWIFT_COPYABLE_IF annotation but that isn't yet supported by the compiler
versions we're using in WebKit. For now, simply exclude the relevant
copy constructor for this type, and another type which depends upon it.
Canonical link: https://commits.webkit.org/305414@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications