Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 20c0bd7d62f4eaef2e9d82e34875ba340b016b0f
https://github.com/WebKit/WebKit/commit/20c0bd7d62f4eaef2e9d82e34875ba340b016b0f
Author: Sergey Rubanov <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
A JSTests/wasm/js-api/global-import-export-identity.js
M
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor-caching.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor-caching.any.worker-expected.txt
M Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp
M Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h
M Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp
Log Message:
-----------
[JSC][Wasm] Re-exported imported immutable Global should be the same object
https://bugs.webkit.org/show_bug.cgi?id=321924
Reviewed by Yusuke Suzuki.
Immutable imported globals copy their value into the instance. Export
then built a new JS wrapper, so re-exporting an imported
WebAssembly.Global produced a different object. Mutable imports already
go through linkGlobal and keep identity.
Remember the imported wrapper and return it from the export object.
Number imports still get a fresh wrapper.
* JSTests/wasm/js-api/global-import-export-identity.js: Added.
*
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor-caching.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor-caching.any.worker-expected.txt:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::visitChildrenImpl):
(JSC::JSWebAssemblyInstance::setImportedGlobalWrapper):
(JSC::JSWebAssemblyInstance::importedGlobalWrapper):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::initializeImports):
(JSC::WebAssemblyModuleRecord::initializeExports):
Canonical link: https://commits.webkit.org/319351@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications