You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
http/tests/workers/service/self_registration.html is a flaky text failure.
https://bugs.webkit.org/show_bug.cgi?id=260823
rdar://114590106
Reviewed by Chris Dumez.
Worker state updates (and events) and Message events are queued on the same DOM manipulation task source.
We moved message events handling to: IPC thread -> context manager work queue -> service worker thread.
But some events are using the past code path: IPC thread -> main thread -> service worker thread.
This is triggering message events to fire faster than the other events/state updaters.
We are now moving all DOM manipulation task source events fired on the service worker to the same code path
(IPC thread -> context manager work queue -> service worker thread).
This includes install, activate, updatefound, statechange, message events.
I was not able to reproduce the http/tests/workers/service/self_registration.html flakiness locally
but this patch should fix this race and should be covered by this test.
* LayoutTests/TestExpectations:
* Source/WebCore/workers/service/SWClientConnection.cpp:
(WebCore::forDedicatedAndSharedWorkers):
(WebCore::forAllWorkers):
(WebCore::SWClientConnection::updateRegistrationState):
(WebCore::SWClientConnection::updateWorkerState):
(WebCore::SWClientConnection::fireUpdateFoundEvent):
* Source/WebCore/workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::updateRegistrationState):
(WebCore::SWContextManager::updateWorkerState):
(WebCore::SWContextManager::fireUpdateFoundEvent):
* Source/WebCore/workers/service/context/SWContextManager.h:
* Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::fireActivateEvent):
* Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::establishSWServerConnection):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::swContextConnection):
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::WebSWServerConnection):
(WebKit::WebSWServerConnection::networkProcess):
(WebKit::WebSWServerConnection::updateRegistrationStateInClient):
(WebKit::WebSWServerConnection::fireUpdateFoundEvent):
(WebKit::WebSWServerConnection::updateWorkerStateInClient):
(WebKit::WebSWServerConnection::scheduleJobInServer):
(WebKit::WebSWServerConnection::registerServiceWorkerClientInternal):
(WebKit::WebSWServerConnection::unregisterServiceWorkerClient):
(WebKit::WebSWServerConnection::contextConnectionCreated):
(WebKit::WebSWServerConnection::session):
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.h:
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::networkProcess):
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
* Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::fireActivateEvent):
(WebKit::WebSWContextManagerConnection::updateRegistrationState):
(WebKit::WebSWContextManagerConnection::updateWorkerState):
(WebKit::WebSWContextManagerConnection::fireUpdateFoundEvent):
* Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h:
* Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in:
Canonical link: https://commits.webkit.org/269460@main
0 commit comments