ladybird/Libraries/LibWeb/WebAssembly
Yayoi-cs 0b9636fadf LibJS: Only cache TypedArray data pointers for owned buffers
WebAssembly.Memory-backed ArrayBuffers wrap external
ByteBuffer storage. When that memory grows,
ByteBuffer::try_resize() may realloc the backing storage while
old fixed-length buffer objects remain reachable from JS.

TypedArrayBase cached m_data for all fixed-length buffers, and
the asm interpreter fast path dereferenced that cached pointer
directly. For wasm memory views this could leave a stale
pointer behind across grow().

Restrict cached typed-array data pointers to fixed-length
ArrayBuffers that own stable ByteBuffer storage.
External/unowned buffers, including WebAssembly.Memory
buffers, now keep m_data == nullptr and fall back to code that
re-derives buffer().data() on each access.

Add regressions for both the original shared-memory grow case
and the second-grow stale-view case.
2026-04-25 06:11:18 +02:00
..
Global.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
Global.h LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
Global.idl LibWeb: Add WebAssembly.Global and exports support for global instances 2024-12-24 15:20:28 +01:00
Instance.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
Instance.h LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
Instance.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
Memory.cpp LibJS: Only cache TypedArray data pointers for owned buffers 2026-04-25 06:11:18 +02:00
Memory.h LibWeb: Implement resizable ArrayBuffers for Wasm memories 2025-08-23 08:26:23 +02:00
Memory.idl LibWeb: Implement resizable ArrayBuffers for Wasm memories 2025-08-23 08:26:23 +02:00
Module.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
Module.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
Module.idl LibWeb/WebAssembly: Implement Module::customSections(module) 2025-04-22 08:43:46 -06:00
Table.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
Table.h LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
Table.idl Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
WebAssembly.cpp LibWeb/Bindings: Emit one bindings header and cpp per IDL 2026-04-21 07:36:13 +02:00
WebAssembly.h LibJS: Separate raw and capturing native functions 2026-04-15 15:57:48 +02:00
WebAssembly.idl LibWeb+LibIDL: Remove support for #import directives during parsing 2026-04-24 20:08:29 +02:00
WebAssemblyModule.cpp LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
WebAssemblyModule.h LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00