[webkit-changes] [WebKit/WebKit] 902de4: Modules with invalid "type" assertion should throw
Yusuke Suzuki
noreply at github.com
Sat Oct 15 01:26:09 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 902de48a7da929d136214ec8feded6f86394e9c9
https://github.com/WebKit/WebKit/commit/902de48a7da929d136214ec8feded6f86394e9c9
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2022-10-15 (Sat, 15 Oct 2022)
Changed paths:
A JSTests/stress/invalid-import-assertion.js
A JSTests/stress/resources/empty.js
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-dynamic-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/dynamic-import-with-assertion-argument.any-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/dynamic-import-with-assertion-argument.any.sharedworker-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/dynamic-import-with-assertion-argument.any.worker-expected.txt
M Source/JavaScriptCore/API/JSAPIGlobalObject.mm
M Source/JavaScriptCore/jsc.cpp
M Source/JavaScriptCore/runtime/Completion.cpp
M Source/JavaScriptCore/runtime/Completion.h
M Source/WebCore/bindings/js/ScriptModuleLoader.cpp
Log Message:
-----------
Modules with invalid "type" assertion should throw
https://bugs.webkit.org/show_bug.cgi?id=246207
rdar://101166148
Reviewed by Justin Michaud and Alexey Shvayka.
This patch throws an error if invalid unsupported "type" import assertion is specified.
* JSTests/stress/invalid-import-assertion.js: Added.
* JSTests/stress/resources/empty.js: Added.
* Source/JavaScriptCore/API/JSAPIGlobalObject.mm:
(JSC::JSAPIGlobalObject::moduleLoaderImportModule):
* Source/JavaScriptCore/jsc.cpp:
(GlobalObject::moduleLoaderImportModule):
* Source/JavaScriptCore/runtime/Completion.cpp:
(JSC::retrieveTypeAssertion):
* Source/JavaScriptCore/runtime/Completion.h:
* Source/WebCore/bindings/js/ScriptModuleLoader.cpp:
(WebCore::ScriptModuleLoader::importModule):
Canonical link: https://commits.webkit.org/255574@main
More information about the webkit-changes
mailing list