Bug 303180

Summary: Allow const calls to CompletionHandler from Swift
Product: WebKit Reporter: adrian_taylor
Component: Web Template FrameworkAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

adrian_taylor
Reported 2025-11-27 05:42:52 PST
Swift/C++ interop does not allow us to pass move-only types from C++ to Swift, so we need to wrap CompletionHandler in a container such as WTF::Cell (see https://github.com/WebKit/WebKit/pull/54517). Methods on the inner CompletionHandler can then be called using box.pointee(...) in Swift. That only allows us to call operator() const, so we need to add such a method to CompletionHandler.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-11-27 05:43:00 PST
adrian_taylor
Comment 2 2025-11-27 05:48:17 PST
Note You need to log in before you can comment on or make changes to this bug.