1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

LibWeb+LibWasm: Implement and use the "reset the Memory buffer" steps

This implements the memory object cache and its "reset on grow"
semantics, as the web depends on the exact behaviour.
This commit is contained in:
Ali Mohammad Pur 2023-03-29 01:31:51 +03:30 committed by Andreas Kling
parent 14fb6372c3
commit 64da05a96d
3 changed files with 55 additions and 5 deletions

View file

@ -38,7 +38,11 @@ private:
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
WebIDL::ExceptionOr<void> reset_the_memory_buffer();
static WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::ArrayBuffer>> create_a_memory_buffer(JS::VM&, JS::Realm&, Wasm::MemoryAddress);
Wasm::MemoryAddress m_address;
mutable JS::GCPtr<JS::ArrayBuffer> m_buffer;
};
}