Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 22b6a610f6fff9e3e34f6b1a872b544fe6da75cb
https://github.com/WebKit/WebKit/commit/22b6a610f6fff9e3e34f6b1a872b544fe6da75cb
Author: Kai Tamkun <[email protected]>
Date: 2026-01-12 (Mon, 12 Jan 2026)
Changed paths:
A JSTests/wasm/stress/wasm-js-string-builtins-signature-validation.js
M JSTests/wasm/stress/wasm-js-string-builtins.js
M Source/JavaScriptCore/wasm/js/WebAssemblyBuiltin.h
Log Message:
-----------
[JSC] Fix ref return type nullability in signatures for wasm js-string
builtins
https://bugs.webkit.org/show_bug.cgi?id=305134
rdar://166830652
Reviewed by Yusuke Suzuki.
Updates the signature validation for wasm js-string builtins that produce
strings. Said builtins can never return null, and their correct return type
is non-nullable `(ref extern)`, but current validation expects nullable
`externref`.
This affects `cast`, `fromCharCode`, `fromCodePoint`, `concat` and `substring`.
Test: JSTests/wasm/stress/wasm-js-string-builtins-signature-validation.js
* JSTests/wasm/stress/wasm-js-string-builtins-signature-validation.js: Added.
(async test): Tests that the updated signatures are accepted and that the old
signatures are rejected.
* JSTests/wasm/stress/wasm-js-string-builtins.js: Updated test to use the
correct signatures.
(async testInstantiation):
(async testInstantiationWithEmptyCompileOptions):
(async instantiate):
(async testImportedStringConstants):
(async testImportInElem):
* Source/JavaScriptCore/wasm/js/WebAssemblyBuiltin.h: Added new signatures and
type expectations.
(JSC::WebAssemblyBuiltinRefExternTypeExpectation::isValid const):
(JSC::WebAssemblyBuiltinTypeExpectation::refExtern):
Canonical link: https://commits.webkit.org/305487@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications