Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fc9e1f45e692511bdf47f9a49102cdeadcc6e707
      
https://github.com/WebKit/WebKit/commit/fc9e1f45e692511bdf47f9a49102cdeadcc6e707
  Author: Asumu Takikawa <as...@igalia.com>
  Date:   2023-12-08 (Fri, 08 Dec 2023)

  Changed paths:
    M JSTests/wasm/gc/js-api.js
    M Source/JavaScriptCore/wasm/WasmGlobal.cpp
    M Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp

  Log Message:
  -----------
  [Wasm-GC] Fix initialization of portable reftype globals
https://bugs.webkit.org/show_bug.cgi?id=265693

Reviewed by Justin Michaud.

Ref-typed globals need to be initialized using the JSValue init path rather
than the "as bits" init path. This is less a problem for functions, as they are
held strongly by the instance, but for other GC types is a bigger problem.

For portable globals, the marking method also needs to check for all reftypes,
not just extern/func.

This is mostly tested by the existing gc/js-api.js test, one test was added for
the marking issue.

* JSTests/wasm/gc/js-api.js:
* Source/JavaScriptCore/wasm/WasmGlobal.cpp:
(JSC::Wasm::Global::visitAggregateImpl):
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::initializeExports):

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to