1
Fork 0
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:
Ali Mohammad Pur 2021-06-21 08:42:58 +04:30 committed by Ali Mohammad Pur
parent eb5c92d4e2
commit 5c90c389c3
7 changed files with 257 additions and 56 deletions

View file

@ -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; }
};
}