mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
LibWeb: Implement the WebAssembly Memory object and Memory imports
This commit is contained in:
parent
eb5c92d4e2
commit
5c90c389c3
7 changed files with 257 additions and 56 deletions
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/NativeFunction.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
||||
class WebAssemblyMemoryConstructor : public JS::NativeFunction {
|
||||
JS_OBJECT(WebAssemblyMemoryConstructor, JS::NativeFunction);
|
||||
|
||||
public:
|
||||
explicit WebAssemblyMemoryConstructor(JS::GlobalObject&);
|
||||
virtual void initialize(JS::GlobalObject&) override;
|
||||
virtual ~WebAssemblyMemoryConstructor() override;
|
||||
|
||||
virtual JS::Value call() override;
|
||||
virtual JS::Value construct(JS::Function& new_target) override;
|
||||
|
||||
private:
|
||||
virtual bool has_constructor() const override { return true; }
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue