Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 23a0006a4e00226f7a764c3ed1315a1275735fe0
      
https://github.com/WebKit/WebKit/commit/23a0006a4e00226f7a764c3ed1315a1275735fe0
  Author: Shu-yu Guo <[email protected]>
  Date:   2025-11-06 (Thu, 06 Nov 2025)

  Changed paths:
    M JSTests/wasm/stress/wasm-js-string-builtins.js
    M Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp
    M Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h
    M Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp

  Log Message:
  -----------
  [JSC] Support imported wasm builtins in elem instructions
https://bugs.webkit.org/show_bug.cgi?id=302134
rdar://163998659

Reviewed by Yusuke Suzuki.

Imported Wasm builtins (like the JS string builtins) should use its JS wrapper,
as the importFunction field is nullptr for those. This was not checked for for
the elem instruction, resulting in nullptr crashes.

A new test case is added to wasm-js-string-builtins.js.

* JSTests/wasm/stress/wasm-js-string-builtins.js:
(async testImportInElem):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::initElementSegment):
(JSC::JSWebAssemblyInstance::getImportFunctionObject):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::initializeExports):

Canonical link: https://commits.webkit.org/302701@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to