Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 47b1bf884eb5adb28e9f3316c4930f5367bac470
https://github.com/WebKit/WebKit/commit/47b1bf884eb5adb28e9f3316c4930f5367bac470
Author: Sergey Rubanov <[email protected]>
Date: 2026-10-12 (Mon, 12 Oct 2026)
Changed paths:
A LayoutTests/http/tests/workers/module-import-own-entry-expected.txt
A LayoutTests/http/tests/workers/module-import-own-entry.html
A LayoutTests/http/tests/workers/resources/module-import-own-entry-helper.js
A LayoutTests/http/tests/workers/resources/module-import-own-entry-worker.js
M Source/JavaScriptCore/runtime/Completion.cpp
M Source/JavaScriptCore/runtime/Completion.h
M Source/WebCore/bindings/js/JSExecState.h
M Source/WebCore/workers/WorkerOrWorkletScriptController.cpp
Log Message:
-----------
A module worker should evaluate its entry script once
https://bugs.webkit.org/show_bug.cgi?id=324459
Reviewed by Yusuke Suzuki.
The worker's top-level module is fetched before the worker starts, then
handed to the module loader as source. That path registered the source
under a private entrypoint key, so an import of the worker's own URL
missed the module map and evaluated a second copy.
Register that source under the script URL. A later import of the entry
reuses the same record.
* LayoutTests/http/tests/workers/module-import-own-entry.html: Added.
* LayoutTests/http/tests/workers/module-import-own-entry-expected.txt: Added.
* LayoutTests/http/tests/workers/resources/module-import-own-entry-helper.js:
Added.
* LayoutTests/http/tests/workers/resources/module-import-own-entry-worker.js:
Added.
* Source/JavaScriptCore/runtime/Completion.cpp:
(JSC::loadModule):
* Source/JavaScriptCore/runtime/Completion.h:
* Source/WebCore/bindings/js/JSExecState.h:
(WebCore::JSExecState::loadModule):
* Source/WebCore/workers/WorkerOrWorkletScriptController.cpp:
(WebCore::WorkerOrWorkletScriptController::loadModuleSynchronously):
Canonical link: https://commits.webkit.org/323507@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications