summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.h')
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.h
new file mode 100644
index 0000000000..ecf8896449
--- /dev/null
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.h
@@ -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; }
+};
+
+}