mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-16 15:30:09 +00:00
LibWeb: Implement the WebAssembly Memory object and Memory imports
This commit is contained in:
parent
eb5c92d4e2
commit
5c90c389c3
Notes:
sideshowbarker
2024-07-18 11:57:06 +09:00
Author: https://github.com/alimpfard
Commit: 5c90c389c3
Pull-request: https://github.com/SerenityOS/serenity/pull/8180
Reviewed-by: https://github.com/linusg
7 changed files with 257 additions and 56 deletions
|
@ -95,19 +95,15 @@ private:
|
|||
};
|
||||
|
||||
class WebAssemblyMemoryObject final : public JS::Object {
|
||||
JS_OBJECT(WebAssemblyModuleObject, JS::Object);
|
||||
JS_OBJECT(WebAssemblyMemoryObject, JS::Object);
|
||||
|
||||
public:
|
||||
explicit WebAssemblyMemoryObject(JS::GlobalObject&, Wasm::MemoryAddress);
|
||||
virtual void initialize(JS::GlobalObject&) override;
|
||||
virtual ~WebAssemblyMemoryObject() override = default;
|
||||
|
||||
auto address() const { return m_address; }
|
||||
|
||||
private:
|
||||
JS_DECLARE_NATIVE_FUNCTION(grow);
|
||||
JS_DECLARE_NATIVE_GETTER(buffer);
|
||||
|
||||
Wasm::MemoryAddress m_address;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue