LibWeb: Support creation of shared memory in WebAssembly API

Add support for shared memory creation in WebAssembly memory API.
This API is needed for WPT tests that use shared array buffers.

Import related WPT tests.
This commit is contained in:
Konstantin Konstantin 2024-12-07 21:17:20 +01:00 committed by Ali Mohammad Pur
commit b03138cbff
Notes: github-actions[bot] 2024-12-08 21:11:34 +00:00
13 changed files with 516 additions and 16 deletions

View file

@ -59,7 +59,7 @@ void Instance::initialize(JS::Realm& realm)
[&](Wasm::MemoryAddress const& address) {
Optional<GC::Ptr<Memory>> object = m_memory_instances.get(address);
if (!object.has_value()) {
object = realm.create<Memory>(realm, address);
object = realm.create<Memory>(realm, address, Memory::Shared::No);
m_memory_instances.set(address, *object);
}