Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f5fbe84ff5650f4512bfef039cbabbe3a350789c
      
https://github.com/WebKit/WebKit/commit/f5fbe84ff5650f4512bfef039cbabbe3a350789c
  Author: Maciej Stachowiak <[email protected]>
  Date:   2026-03-13 (Fri, 13 Mar 2026)

  Changed paths:
    M Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh
    M Tools/TestWebKitAPI/SourcesCocoa.txt
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A 
Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerModuleUnregisterDuringLoad.mm
    M Tools/TestWebKitAPI/UnifiedSources-output.xcfilelist

  Log Message:
  -----------
  Test for StabilityTracer: com.apple.WebKit.WebContent at com.apple.WebCore:  
WebCore::WorkerOrWorkletGlobalScope::vm
rdar://134640814
https://bugs.webkit.org/show_bug.cgi?id=309789

Reviewed by David Kilzer and Chris Dumez.

Add a test that exercises the production code path where a module service
worker runs on the main thread via WorkerMainRunLoop (triggered by
serviceWorkerPageIdentifier, as used by Web Extensions / Safari). The test
registers a module service worker whose dependency never finishes loading,
then closes the web view to stop the worker while loadModuleSynchronously()
is still spinning RunLoop::main().cycle(). Without the fix in
WorkerMainRunLoop::runInMode() (returning !terminated() instead of true),
this causes a null dereference crash when performMicrotaskCheckpoint() calls
vm() on a cleared m_script.

Test case and analysis assisted by AI.

* Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh:
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* 
Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerModuleUnregisterDuringLoad.mm:
 Added.
(ModuleUnregisterDuringLoadNoMainThreadCrash)):
* Tools/TestWebKitAPI/UnifiedSources-output.xcfilelist:

Canonical link: https://commits.webkit.org/309193@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to