/* * Copyright (c) 2021, Ali Mohammad Pur * Copyright (c) 2023, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include #include namespace Web::WebAssembly { class Module : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(Module, Bindings::PlatformObject); JS_DECLARE_ALLOCATOR(Module); public: static WebIDL::ExceptionOr> construct_impl(JS::Realm&, JS::Handle& bytes); NonnullRefPtr compiled_module() const { return m_compiled_module; } private: Module(JS::Realm&, NonnullRefPtr); virtual void initialize(JS::Realm&) override; NonnullRefPtr m_compiled_module; }; }