diff --git a/Userland/Libraries/LibWeb/WebAssembly/Memory.cpp b/Userland/Libraries/LibWeb/WebAssembly/Memory.cpp index caed9aa77ddd8c..894edb8e4804de 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/Memory.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/Memory.cpp @@ -47,6 +47,12 @@ void Memory::initialize(JS::Realm& realm) WEB_SET_PROTOTYPE_FOR_INTERFACE_WITH_CUSTOM_NAME(Memory, WebAssembly.Memory); } +void Memory::visit_edges(Visitor& visitor) +{ + Base::visit_edges(visitor); + visitor.visit(m_buffer); +} + // https://webassembly.github.io/spec/js-api/#dom-memory-grow WebIDL::ExceptionOr Memory::grow(u32 delta) { diff --git a/Userland/Libraries/LibWeb/WebAssembly/Memory.h b/Userland/Libraries/LibWeb/WebAssembly/Memory.h index 180bc2925040d0..bb4f832c15a83d 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/Memory.h +++ b/Userland/Libraries/LibWeb/WebAssembly/Memory.h @@ -38,6 +38,7 @@ class Memory : public Bindings::PlatformObject { Memory(JS::Realm&, Wasm::MemoryAddress); virtual void initialize(JS::Realm&) override; + virtual void visit_edges(Visitor&) override; WebIDL::ExceptionOr reset_the_memory_buffer(); static WebIDL::ExceptionOr> create_a_memory_buffer(JS::VM&, JS::Realm&, Wasm::MemoryAddress);