⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 284467 in webkit


Ignore:
Timestamp:
Oct 19, 2021, 10:36:49 AM (5 years ago)
Author:
ysuzuki@apple.com
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):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r284460 r284467  
     12021-10-18  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Wasm Table can take arbitrary default value
     4        https://bugs.webkit.org/show_bug.cgi?id=231933
     5        rdar://84327812
     6
     7        Reviewed by Robin Morisset.
     8
     9        * wasm/WasmTable.cpp:
     10        (JSC::Wasm::Table::grow):
     11
    1122021-10-19  Chris Dumez  <cdumez@apple.com>
    213
  • 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.