ServiceWorker saves module scripts
Created attachment 425573 [details] Patch
<rdar://problem/75634897>
Created attachment 425574 [details] Patch
Created attachment 425576 [details] Patch
Created attachment 425578 [details] Patch
Created attachment 425579 [details] Patch
Created attachment 425582 [details] Patch
Created attachment 425583 [details] Patch
Created attachment 425585 [details] Patch
Created attachment 425586 [details] Patch
We found that existing test mechanism "testRunner.terminateNetworkProcess" does not work well with guard-malloc configuration. https://bugs.webkit.org/show_bug.cgi?id=224358
Created attachment 425588 [details] Patch
Created attachment 425589 [details] Patch
Comment on attachment 425589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425589&action=review > LayoutTests/http/wpt/service-workers/network-process-termination.html:21 > +<html> > +<head> > +<script src="resources/routines.js"></script> > +</head> > +<body> > +<script> > +if (window.testRunner) { > + testRunner.dumpAsText(); > + testRunner.waitUntilDone(); > +} > +async function doTest() { > + testRunner.terminateNetworkProcess(); > + await waitFor(100); > + document.body.innerHTML = "PASS"; > + if (window.testRunner) > + testRunner.notifyDone(); > +} > +doTest(); > +</script> > +</body> > +</html> I added this test to show that existing testRunner.terminateNetworkProcess() is not working well with mac-wk2-stress's guard-malloc runs. (possibly, killing the process does not work well for guard-malloc runs?). But this is not an issue of this patch itself since it is just using the existing test mechanism (we have many tests using this). This issue is filed separately in https://bugs.webkit.org/show_bug.cgi?id=224358
Comment on attachment 425589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425589&action=review >> LayoutTests/http/wpt/service-workers/network-process-termination.html:21 >> +</html> > > I added this test to show that existing testRunner.terminateNetworkProcess() is not working well with mac-wk2-stress's guard-malloc runs. (possibly, killing the process does not work well for guard-malloc runs?). > But this is not an issue of this patch itself since it is just using the existing test mechanism (we have many tests using this). > This issue is filed separately in https://bugs.webkit.org/show_bug.cgi?id=224358 Note that this worked on local working environment with --guard-malloc. And since guard-malloc bot does not report failures about terminateNetworkProcess, this failure is specific to new EWS mac-wk2-stress's configuration.
Comment on attachment 425589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425589&action=review > Source/WebCore/bindings/js/ScriptModuleLoader.cpp:191 > + // This can invoke callback immediately. This comment is not very clear to me. > Source/WebCore/bindings/js/ScriptModuleLoader.cpp:411 > + m_requestURLToResponseURLMap.add(sourceURL.string(), responseURL); WTFMove(responseURL) > Source/WebCore/bindings/js/ScriptModuleLoader.cpp:459 > + m_requestURLToResponseURLMap.add(sourceURL.string(), responseURL); WTFMove >>> LayoutTests/http/wpt/service-workers/network-process-termination.html:21 >>> +</html> >> >> I added this test to show that existing testRunner.terminateNetworkProcess() is not working well with mac-wk2-stress's guard-malloc runs. (possibly, killing the process does not work well for guard-malloc runs?). >> But this is not an issue of this patch itself since it is just using the existing test mechanism (we have many tests using this). >> This issue is filed separately in https://bugs.webkit.org/show_bug.cgi?id=224358 > > Note that this worked on local working environment with --guard-malloc. And since guard-malloc bot does not report failures about terminateNetworkProcess, this failure is specific to new EWS mac-wk2-stress's configuration. Maybe this test should be in its own patch?
Comment on attachment 425589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425589&action=review Thanks! >> Source/WebCore/bindings/js/ScriptModuleLoader.cpp:191 >> + // This can invoke callback immediately. > > This comment is not very clear to me. OK, removed. >> Source/WebCore/bindings/js/ScriptModuleLoader.cpp:411 >> + m_requestURLToResponseURLMap.add(sourceURL.string(), responseURL); > > WTFMove(responseURL) Looks good! >> Source/WebCore/bindings/js/ScriptModuleLoader.cpp:459 >> + m_requestURLToResponseURLMap.add(sourceURL.string(), responseURL); > > WTFMove We still use responseURL (L462). >>>> LayoutTests/http/wpt/service-workers/network-process-termination.html:21 >>>> +</html> >>> >>> I added this test to show that existing testRunner.terminateNetworkProcess() is not working well with mac-wk2-stress's guard-malloc runs. (possibly, killing the process does not work well for guard-malloc runs?). >>> But this is not an issue of this patch itself since it is just using the existing test mechanism (we have many tests using this). >>> This issue is filed separately in https://bugs.webkit.org/show_bug.cgi?id=224358 >> >> Note that this worked on local working environment with --guard-malloc. And since guard-malloc bot does not report failures about terminateNetworkProcess, this failure is specific to new EWS mac-wk2-stress's configuration. > > Maybe this test should be in its own patch? Sounds good. I'll upload this test in a filed bugzilla.
Committed r275751 (236329@main): <https://commits.webkit.org/236329@main>
*** Bug 223135 has been marked as a duplicate of this bug. ***