Add support for processing push events without service worker clients
Created attachment 440351 [details] Patch
Created attachment 440359 [details] Patch
Created attachment 440361 [details] Patch
Created attachment 440372 [details] Patch
Comment on attachment 440372 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440372&action=review > Source/WebCore/workers/service/server/SWServer.cpp:1218 > + terminateWorkerTimer->startOneShot(weakThis && weakThis->m_isProcessTerminationDelayEnabled ? defaultTerminationDelay : 1_s); Does this mean that we have one second to: 1. IPC the SW process 2. Dispatch to the SW thread 3. Dispatch and handle the push event in JS 4. Dispatch back to the main thread 5. IPC back to the network process If so, doesn't it seem a bit low? Seems like this could cause flakiness on some slower / overloaded machines. I think our UIProcess responsiveness timer uses 3 seconds and even then, is only enabled on release builds (No debug builds, no ASAN, not under debugger).
(In reply to Chris Dumez from comment #5) > Comment on attachment 440372 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=440372&action=review > > > Source/WebCore/workers/service/server/SWServer.cpp:1218 > > + terminateWorkerTimer->startOneShot(weakThis && weakThis->m_isProcessTerminationDelayEnabled ? defaultTerminationDelay : 1_s); > > Does this mean that we have one second to: > 1. IPC the SW process > 2. Dispatch to the SW thread > 3. Dispatch and handle the push event in JS > 4. Dispatch back to the main thread > 5. IPC back to the network process > > If so, doesn't it seem a bit low? Seems like this could cause flakiness on > some slower / overloaded machines. Maybe, this is for testing, and this should only kick in for API tests since otherwise we will have a service worker client. Also, the only test is actually trying to trigger the timeout, so even in case we are slow and it takes more than 1 second, we should be good for that particular test. I can increase it to 3 seconds, but then the test will run for longer. Let's try it
Created attachment 440581 [details] Patch for landing
Went with 2 seconds for now.
Committed r283796 (242689@main): <https://commits.webkit.org/242689@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 440581 [details].
<rdar://problem/84020871>