Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 847b9725e347634c24739217b3dcdd40534ec7f0
https://github.com/WebKit/WebKit/commit/847b9725e347634c24739217b3dcdd40534ec7f0
Author: Richard Robinson <[email protected]>
Date: 2025-06-27 (Fri, 27 Jun 2025)
Changed paths:
M Source/WebKit/UIProcess/API/Swift/WebPage.swift
M Tools/SwiftBrowser/Source/Views/ContentView.swift
M Tools/TestWebKitAPI/Tests/WebKit Swift/WebPageNavigationTests.swift
Log Message:
-----------
[SwiftUI] Cannot load any content if the return value of the loading APIs is
discarded
https://bugs.webkit.org/show_bug.cgi?id=295133
rdar://154524118
Reviewed by Aditya Keerthi.
The updated API added in 296486@main added functionality to facilitate
cancelling a navigation
if the navigation stream that results from using the loading APIs is cancelled.
However, this had the unintended side effect of always immediately cancelling a
navigation
if the return value is discarded, since the stream's lifetime will have ended
instantly.
Fix by storing the streams internally like how the continuations are stored so
that their lifetime
is tied to the lifetime of the WebPage except if the client explicitly cancels
it.
Add a test, and address a FIXME in SwiftBrowser.
* Source/WebKit/UIProcess/API/Swift/WebPage.swift:
(scopedStreams):
(toNavigationSequence(_:)):
* Tools/SwiftBrowser/Source/Views/ContentView.swift:
(ContentView.body):
* Tools/TestWebKitAPI/Tests/WebKit Swift/WebPageNavigationTests.swift:
(WebPageNavigationTests.navigationProceedsAfterDiscardingNavigationStream):
Canonical link: https://commits.webkit.org/296765@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes