ladybird/Libraries/LibWeb/WebAssembly/Memory.idl
Konstantin Konstantin b03138cbff 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.
2024-12-08 22:10:45 +01:00

16 lines
512 B
Text

dictionary MemoryDescriptor {
required [EnforceRange] unsigned long initial;
[EnforceRange] unsigned long maximum;
// https://webassembly.github.io/threads/js-api/index.html#dictdef-memorydescriptor
boolean shared = false;
};
// https://webassembly.github.io/spec/js-api/#memories
[LegacyNamespace=WebAssembly, Exposed=*]
interface Memory {
constructor(MemoryDescriptor descriptor);
unsigned long grow([EnforceRange] unsigned long delta);
readonly attribute ArrayBuffer buffer;
};