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

Changeset 284805 in webkit


Ignore:
Timestamp:
Oct 25, 2021, 12:09:50 PM (5 years ago)
Author:
Alan Coon
Message:

Cherry-pick r284467. rdar://problem/84327812

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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284467 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-612-branch/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612-branch/Source/JavaScriptCore/ChangeLog

    r284801 r284805  
     12021-10-25  Null  <null@apple.com>
     2
     3        Cherry-pick r284467. rdar://problem/84327812
     4
     5    Wasm Table can take arbitrary default value
     6    https://bugs.webkit.org/show_bug.cgi?id=231933
     7    rdar://84327812
     8   
     9    Reviewed by Robin Morisset.
     10   
     11    * wasm/WasmTable.cpp:
     12    (JSC::Wasm::Table::grow):
     13   
     14    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     15
     16    2021-10-18  Yusuke Suzuki  <ysuzuki@apple.com>
     17
     18            Wasm Table can take arbitrary default value
     19            https://bugs.webkit.org/show_bug.cgi?id=231933
     20            rdar://84327812
     21
     22            Reviewed by Robin Morisset.
     23
     24            * wasm/WasmTable.cpp:
     25            (JSC::Wasm::Table::grow):
     26
    1272021-10-25  Null  <null@apple.com>
    228
  • branches/safari-612-branch/Source/JavaScriptCore/wasm/WasmTable.cpp

    r278369 r284805  
    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.