Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 198dfbabf0c0dce75b16f5a5e2c8901770664d22
https://github.com/WebKit/WebKit/commit/198dfbabf0c0dce75b16f5a5e2c8901770664d22
Author: Chris Dumez <[email protected]>
Date: 2026-04-15 (Wed, 15 Apr 2026)
Changed paths:
M LayoutTests/TestExpectations
R
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.any.window-expected.txt
R
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.any.window.html
R
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.any.window.js
A
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.window-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.window.html
A
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.window.js
M Source/WebCore/page/EventSource.cpp
Log Message:
-----------
EventSource should be closed when window.stop() is called
https://bugs.webkit.org/show_bug.cgi?id=312342
Reviewed by Anne van Kesteren.
When window.stop() cancels an EventSource's load, EventSource::didFail()
was treating the cancellation as a navigation-away scenario, setting
m_shouldReconnectOnResume and returning early to wait for a back/forward
cache resume that never comes. This left the EventSource in a limbo state
where readyState was never set to CLOSED and no error event was fired.
Fix this by checking LocalDOMWindow::isStopping() to distinguish
window.stop() from navigation. When the window is stopping, we properly
close the EventSource and fire an error event.
No new tests, rebaselined existing WPT test. This test was already passing
in Chrome and Firefox.
* LayoutTests/TestExpectations:
Unskip the WPT test.
*
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.any.window-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.window-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.window.html:
Renamed from
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.any.window.html.
*
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.window.js:
Renamed from
LayoutTests/imported/w3c/web-platform-tests/eventsource/eventsource-request-cancellation.any.window.js.
Rename the test to match its new name upstream.
* Source/WebCore/page/EventSource.cpp:
(WebCore::EventSource::didFail):
Canonical link: https://commits.webkit.org/311281@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications