• Jakob Kummerow's avatar
    [wasm-gc] Use correct Context when wrapping objects · 647b41ef
    Jakob Kummerow authored
    For creating and unpacking the wrapper objects we currently use
    for WasmGC <-> JavaScript interop, we must read the Context from
    the "WasmApiFunctionRef" rather than from the "instance_node_".
    
    As a bonus, this patch also slightly improves generated code
    for wasm-to-js wrappers by moving conditionally needed code to
    labels (previously it was always executed but the results only
    conditionally used).
    
    Fixed: v8:12640
    Change-Id: I55485cdb6a402f32ddc42ec6316dcbe23f1fcccb
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3489486
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
    Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#79270}
    647b41ef
wasm-compiler.cc 352 KB