Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 537527cbaebdb1b76496bae4a97e94bc81aa59d9
https://github.com/WebKit/WebKit/commit/537527cbaebdb1b76496bae4a97e94bc81aa59d9
Author: Ryosuke Niwa <[email protected]>
Date: 2025-08-11 (Mon, 11 Aug 2025)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.worker-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-fetch-error.sub-expected.txt
M
LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-fetch-error.sub-expected.txt
M Source/JavaScriptCore/builtins/BuiltinNames.h
M Source/JavaScriptCore/builtins/ModuleLoader.js
M Source/JavaScriptCore/runtime/JSModuleLoader.cpp
M Source/WebCore/bindings/js/ScriptController.cpp
M Source/WebCore/bindings/js/ScriptModuleLoader.cpp
M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
M Source/WebCore/workers/WorkerOrWorkletScriptController.cpp
Log Message:
-----------
When a module fetch fails, we should not attempt to refetch the same module
https://bugs.webkit.org/show_bug.cgi?id=297120
Reviewed by Yusuke Suzuki.
This PR updates JSC's module loader so that once the fetching of a (specifier,
type) pair was attempted,
JSC doesn't try to fetch the same pair again in the future. The new behavior is
more spec compliant and
matches that of Firefox and Chrome. Note that we still create a new Error
object for every import per spec.
Also move WebCore's failureKind to JSC so that we could copy the value over
when cloning the error object.
This portion of the PR is written by Shu-yu Guo.
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.worker-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-fetch-error.sub-expected.txt:
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-fetch-error.sub-expected.txt:
* Source/JavaScriptCore/builtins/BuiltinNames.h:
* Source/JavaScriptCore/builtins/ModuleLoader.js:
(visibility.PrivateRecursive.requestFetch):
* Source/JavaScriptCore/runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/WebCore/bindings/js/ScriptController.cpp:
(WebCore::ScriptController::setupModuleScriptHandlers):
* Source/WebCore/bindings/js/ScriptModuleLoader.cpp:
(WebCore::ScriptModuleLoader::resolve):
(WebCore::rejectToPropagateNetworkError):
(WebCore::rejectWithFetchError):
* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/workers/WorkerOrWorkletScriptController.cpp:
(WebCore::WorkerOrWorkletScriptController::loadModuleSynchronously):
(WebCore::WorkerOrWorkletScriptController::loadAndEvaluateModule):
Canonical link: https://commits.webkit.org/298544@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes