Ignore:
Timestamp:
Oct 19, 2021, 10:36:49 AM (4 years ago)
Author:
[email protected]
Message:

Wasm Table can take arbitrary default value
https://bugs.webkit.org/show_bug.cgi?id=231933
rdar://84327812

Reviewed by Robin Morisset.

  • wasm/WasmTable.cpp:

(JSC::Wasm::Table::grow):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/wasm/WasmTable.cpp

    r278369 r284467  
    116116
    117117    if (auto* funcRefTable = asFuncrefTable()) {
    118         if (!checkedGrow(funcRefTable->m_importableFunctions, [] (auto&) { }))
     118        if (!checkedGrow(funcRefTable->m_importableFunctions, [](auto&) { }))
    119119            return std::nullopt;
    120         if (!checkedGrow(funcRefTable->m_instances, [] (auto&) { }))
     120        if (!checkedGrow(funcRefTable->m_instances, [](auto&) { }))
    121121            return std::nullopt;
    122122    }
    123123
    124     if (!checkedGrow(m_jsValues, [defaultValue] (WriteBarrier<Unknown>& slot) { slot.setStartingValue(defaultValue); }))
     124    VM& vm = m_owner->vm();
     125    if (!checkedGrow(m_jsValues, [&](WriteBarrier<Unknown>& slot) { slot.set(vm, m_owner, defaultValue); }))
    125126        return std::nullopt;
    126127
Note: See TracChangeset for help on using the changeset viewer.