From de32c44762faa039c250eaa7b0cd0bacf3a7209e Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 15 Mar 2023 18:15:28 -0400 Subject: [PATCH] LibWeb: Port WebAssembly.Instance to IDL --- .../BindingsGenerator/IDLGenerators.cpp | 1 + .../GenerateWindowOrWorkerInterfaces.cpp | 4 - Userland/Libraries/LibWeb/CMakeLists.txt | 4 +- Userland/Libraries/LibWeb/Forward.h | 1 + .../Libraries/LibWeb/WebAssembly/Instance.cpp | 98 +++++++++++++++++++ .../Libraries/LibWeb/WebAssembly/Instance.h | 37 +++++++ .../Libraries/LibWeb/WebAssembly/Instance.idl | 9 ++ .../WebAssemblyInstanceConstructor.cpp | 53 ---------- .../WebAssemblyInstanceConstructor.h | 28 ------ .../WebAssembly/WebAssemblyInstanceObject.cpp | 83 ---------------- .../WebAssembly/WebAssemblyInstanceObject.h | 39 -------- .../WebAssemblyInstanceObjectPrototype.cpp | 31 ------ .../WebAssemblyInstanceObjectPrototype.h | 32 ------ .../LibWeb/WebAssembly/WebAssemblyObject.cpp | 8 +- .../LibWeb/WebAssembly/WebAssemblyObject.h | 1 - .../WebAssembly/WebAssemblyTableObject.h | 1 - Userland/Libraries/LibWeb/idl_files.cmake | 1 + 17 files changed, 152 insertions(+), 279 deletions(-) create mode 100644 Userland/Libraries/LibWeb/WebAssembly/Instance.cpp create mode 100644 Userland/Libraries/LibWeb/WebAssembly/Instance.h create mode 100644 Userland/Libraries/LibWeb/WebAssembly/Instance.idl delete mode 100644 Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.cpp delete mode 100644 Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.h delete mode 100644 Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp delete mode 100644 Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.h delete mode 100644 Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp delete mode 100644 Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index 67e9274178..93bca5a83b 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -37,6 +37,7 @@ static bool is_platform_object(Type const& type) "FileList"sv, "FormData"sv, "ImageData"sv, + "Instance"sv, "Module"sv, "MutationRecord"sv, "NamedNodeMap"sv, diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp index b4743a5629..eacb2ba196 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp @@ -104,7 +104,6 @@ class @legacy_constructor_class@;)~~~"); { auto gen = generator.fork(); add_interface(gen, "WebAssemblyMemoryPrototype"sv, "WebAssemblyMemoryConstructor"sv, {}); - add_interface(gen, "WebAssemblyInstancePrototype"sv, "WebAssemblyInstanceConstructor"sv, {}); add_interface(gen, "WebAssemblyTablePrototype"sv, "WebAssemblyTableConstructor"sv, {}); } @@ -156,8 +155,6 @@ static ErrorOr generate_intrinsic_definitions(StringView output_path, Vect generator.append(R"~~~( #include #include -#include -#include #include #include )~~~"); @@ -229,7 +226,6 @@ void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Rea { auto gen = generator.fork(); add_interface(gen, "WebAssembly.Memory"sv, "WebAssemblyMemoryPrototype"sv, "WebAssemblyMemoryConstructor"sv, {}); - add_interface(gen, "WebAssembly.Instance"sv, "WebAssemblyInstancePrototype"sv, "WebAssemblyInstanceConstructor"sv, {}); add_interface(gen, "WebAssembly.Table"sv, "WebAssemblyTablePrototype"sv, "WebAssemblyTableConstructor"sv, {}); } diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt index 8a0064252f..ff7b35d4ac 100644 --- a/Userland/Libraries/LibWeb/CMakeLists.txt +++ b/Userland/Libraries/LibWeb/CMakeLists.txt @@ -442,10 +442,8 @@ set(SOURCES URL/URL.cpp URL/URLSearchParams.cpp URL/URLSearchParamsIterator.cpp + WebAssembly/Instance.cpp WebAssembly/Module.cpp - WebAssembly/WebAssemblyInstanceConstructor.cpp - WebAssembly/WebAssemblyInstanceObject.cpp - WebAssembly/WebAssemblyInstanceObjectPrototype.cpp WebAssembly/WebAssemblyMemoryConstructor.cpp WebAssembly/WebAssemblyMemoryPrototype.cpp WebAssembly/WebAssemblyObject.cpp diff --git a/Userland/Libraries/LibWeb/Forward.h b/Userland/Libraries/LibWeb/Forward.h index e19c5c0fc3..65dc5afff8 100644 --- a/Userland/Libraries/LibWeb/Forward.h +++ b/Userland/Libraries/LibWeb/Forward.h @@ -482,6 +482,7 @@ class ResourceLoader; } namespace Web::WebAssembly { +class Instance; class Module; } diff --git a/Userland/Libraries/LibWeb/WebAssembly/Instance.cpp b/Userland/Libraries/LibWeb/WebAssembly/Instance.cpp new file mode 100644 index 0000000000..1d73057bc1 --- /dev/null +++ b/Userland/Libraries/LibWeb/WebAssembly/Instance.cpp @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2021, Ali Mohammad Pur + * Copyright (c) 2023, Tim Flynn + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Web::WebAssembly { + +WebIDL::ExceptionOr> Instance::construct_impl(JS::Realm& realm, Module& module, Optional>& import_object) +{ + // FIXME: Implement the importObject parameter. + (void)import_object; + + auto& vm = realm.vm(); + + auto index = TRY(Bindings::WebAssemblyObject::instantiate_module(vm, module.module())); + return MUST_OR_THROW_OOM(vm.heap().allocate(realm, realm, index)); +} + +Instance::Instance(JS::Realm& realm, size_t index) + : Bindings::PlatformObject(realm) + , m_exports(Object::create(realm, nullptr)) + , m_index(index) +{ +} + +JS::ThrowCompletionOr Instance::initialize(JS::Realm& realm) +{ + auto& vm = this->vm(); + + MUST_OR_THROW_OOM(Base::initialize(realm)); + set_prototype(&Bindings::ensure_web_prototype(realm, "WebAssembly.Instance"sv)); + + auto& instance = *Bindings::WebAssemblyObject::s_instantiated_modules[m_index]; + auto& cache = Bindings::WebAssemblyObject::s_module_caches.at(m_index); + + for (auto& export_ : instance.exports()) { + TRY(export_.value().visit( + [&](Wasm::FunctionAddress const& address) -> JS::ThrowCompletionOr { + Optional> object = cache.function_instances.get(address); + if (!object.has_value()) { + object = Bindings::create_native_function(vm, address, export_.name()); + cache.function_instances.set(address, *object); + } + + m_exports->define_direct_property(export_.name(), *object, JS::default_attributes); + return {}; + }, + [&](Wasm::MemoryAddress const& address) -> JS::ThrowCompletionOr { + Optional> object = cache.memory_instances.get(address); + if (!object.has_value()) { + object = MUST_OR_THROW_OOM(heap().allocate(realm, realm, address)); + cache.memory_instances.set(address, *object); + } + + m_exports->define_direct_property(export_.name(), *object, JS::default_attributes); + return {}; + }, + [&](Wasm::TableAddress const& address) -> JS::ThrowCompletionOr { + Optional> object = cache.table_instances.get(address); + if (!object.has_value()) { + object = MUST_OR_THROW_OOM(heap().allocate(realm, realm, address)); + cache.table_instances.set(address, *object); + } + + m_exports->define_direct_property(export_.name(), *object, JS::default_attributes); + return {}; + }, + [&](auto const&) -> JS::ThrowCompletionOr { + // FIXME: Implement other exports! + return {}; + })); + } + + MUST(m_exports->set_integrity_level(IntegrityLevel::Frozen)); + return {}; +} + +void Instance::visit_edges(Visitor& visitor) +{ + Base::visit_edges(visitor); + visitor.visit(m_exports); +} + +} diff --git a/Userland/Libraries/LibWeb/WebAssembly/Instance.h b/Userland/Libraries/LibWeb/WebAssembly/Instance.h new file mode 100644 index 0000000000..c3f4380d01 --- /dev/null +++ b/Userland/Libraries/LibWeb/WebAssembly/Instance.h @@ -0,0 +1,37 @@ +/* + * 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 + +namespace Web::WebAssembly { + +class Instance : public Bindings::PlatformObject { + WEB_PLATFORM_OBJECT(Instance, Bindings::PlatformObject); + +public: + static WebIDL::ExceptionOr> construct_impl(JS::Realm&, Module& module, Optional>& import_object); + + Object const* exports() const { return m_exports.ptr(); } + +private: + Instance(JS::Realm&, size_t index); + + virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; + virtual void visit_edges(Visitor&) override; + + JS::NonnullGCPtr m_exports; + size_t m_index { 0 }; +}; + +} diff --git a/Userland/Libraries/LibWeb/WebAssembly/Instance.idl b/Userland/Libraries/LibWeb/WebAssembly/Instance.idl new file mode 100644 index 0000000000..5a31ec18f1 --- /dev/null +++ b/Userland/Libraries/LibWeb/WebAssembly/Instance.idl @@ -0,0 +1,9 @@ +#import + +// https://webassembly.github.io/spec/js-api/#instances +[LegacyNamespace=WebAssembly, Exposed=*] +interface Instance { + constructor(Module module, optional object importObject); + + readonly attribute object exports; +}; diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.cpp deleted file mode 100644 index f7b5091d4d..0000000000 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2021, Ali Mohammad Pur - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#include -#include -#include -#include -#include -#include -#include - -namespace Web::Bindings { - -WebAssemblyInstanceConstructor::WebAssemblyInstanceConstructor(JS::Realm& realm) - : NativeFunction(*realm.intrinsics().function_prototype()) -{ -} - -WebAssemblyInstanceConstructor::~WebAssemblyInstanceConstructor() = default; - -JS::ThrowCompletionOr WebAssemblyInstanceConstructor::call() -{ - return vm().throw_completion(JS::ErrorType::ConstructorWithoutNew, "WebAssembly.Instance"); -} - -JS::ThrowCompletionOr> WebAssemblyInstanceConstructor::construct(FunctionObject&) -{ - auto& vm = this->vm(); - auto& realm = *vm.current_realm(); - - auto* module_argument = TRY(vm.argument(0).to_object(vm)); - if (!is(module_argument)) - return vm.throw_completion(JS::ErrorType::NotAnObjectOfType, "WebAssembly.Module"); - auto& module_object = static_cast(*module_argument); - auto result = TRY(WebAssemblyObject::instantiate_module(vm, module_object.module())); - return MUST_OR_THROW_OOM(heap().allocate(realm, realm, result)); -} - -JS::ThrowCompletionOr WebAssemblyInstanceConstructor::initialize(JS::Realm& realm) -{ - auto& vm = this->vm(); - - MUST_OR_THROW_OOM(NativeFunction::initialize(realm)); - define_direct_property(vm.names.prototype, &Bindings::ensure_web_prototype(realm, "WebAssembly.Instance"), 0); - define_direct_property(vm.names.length, JS::Value(1), JS::Attribute::Configurable); - - return {}; -} - -} diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.h deleted file mode 100644 index e5b7341110..0000000000 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2021, Ali Mohammad Pur - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#pragma once - -#include - -namespace Web::Bindings { - -class WebAssemblyInstanceConstructor : public JS::NativeFunction { - JS_OBJECT(WebAssemblyInstanceConstructor, JS::NativeFunction); - -public: - explicit WebAssemblyInstanceConstructor(JS::Realm&); - virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; - virtual ~WebAssemblyInstanceConstructor() override; - - virtual JS::ThrowCompletionOr call() override; - virtual JS::ThrowCompletionOr> construct(JS::FunctionObject& new_target) override; - -private: - virtual bool has_constructor() const override { return true; } -}; - -} diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp deleted file mode 100644 index a22713884d..0000000000 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2021, Ali Mohammad Pur - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Web::Bindings { - -WebAssemblyInstanceObject::WebAssemblyInstanceObject(JS::Realm& realm, size_t index) - : Object(ConstructWithPrototypeTag::Tag, Bindings::ensure_web_prototype(realm, "WebAssembly.Instance")) - , m_index(index) -{ -} - -JS::ThrowCompletionOr WebAssemblyInstanceObject::initialize(JS::Realm& realm) -{ - MUST_OR_THROW_OOM(Object::initialize(realm)); - - auto& vm = this->vm(); - - VERIFY(!m_exports_object); - m_exports_object = create(realm, nullptr); - auto& instance = this->instance(); - auto& cache = this->cache(); - for (auto& export_ : instance.exports()) { - TRY(export_.value().visit( - [&](Wasm::FunctionAddress const& address) -> JS::ThrowCompletionOr { - Optional> object = cache.function_instances.get(address); - if (!object.has_value()) { - object = create_native_function(vm, address, export_.name()); - cache.function_instances.set(address, *object); - } - m_exports_object->define_direct_property(export_.name(), *object, JS::default_attributes); - return {}; - }, - [&](Wasm::MemoryAddress const& address) -> JS::ThrowCompletionOr { - Optional> object = cache.memory_instances.get(address); - if (!object.has_value()) { - object = MUST_OR_THROW_OOM(heap().allocate(realm, realm, address)); - cache.memory_instances.set(address, *object); - } - m_exports_object->define_direct_property(export_.name(), *object, JS::default_attributes); - return {}; - }, - [&](Wasm::TableAddress const& address) -> JS::ThrowCompletionOr { - Optional> object = cache.table_instances.get(address); - if (!object.has_value()) { - object = MUST_OR_THROW_OOM(heap().allocate(realm, realm, address)); - cache.table_instances.set(address, *object); - } - m_exports_object->define_direct_property(export_.name(), *object, JS::default_attributes); - return {}; - }, - [&](auto const&) -> JS::ThrowCompletionOr { - // FIXME: Implement other exports! - return {}; - })); - } - - MUST(m_exports_object->set_integrity_level(IntegrityLevel::Frozen)); - - return {}; -} - -void WebAssemblyInstanceObject::visit_edges(Visitor& visitor) -{ - Base::visit_edges(visitor); - visitor.visit(m_exports_object); -} - -} diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.h deleted file mode 100644 index e5347e288b..0000000000 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2021, Ali Mohammad Pur - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#pragma once - -#include -#include -#include -#include -#include -#include - -namespace Web::Bindings { - -class WebAssemblyInstanceObject final : public JS::Object { - JS_OBJECT(WebAssemblyInstanceObject, Object); - -public: - explicit WebAssemblyInstanceObject(JS::Realm&, size_t index); - virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; - virtual ~WebAssemblyInstanceObject() override = default; - - size_t index() const { return m_index; } - Wasm::ModuleInstance& instance() const { return *WebAssemblyObject::s_instantiated_modules[m_index]; } - auto& cache() { return WebAssemblyObject::s_module_caches.at(m_index); } - - void visit_edges(Visitor&) override; - - friend class WebAssemblyInstancePrototype; - -private: - size_t m_index { 0 }; - JS::GCPtr m_exports_object; -}; - -} diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp deleted file mode 100644 index bc322e7a24..0000000000 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2021, Ali Mohammad Pur - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#include "WebAssemblyInstanceObject.h" -#include -#include - -namespace Web::Bindings { - -JS::ThrowCompletionOr WebAssemblyInstancePrototype::initialize(JS::Realm& realm) -{ - MUST_OR_THROW_OOM(Object::initialize(realm)); - define_native_accessor(realm, "exports", exports_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); - - return {}; -} - -JS_DEFINE_NATIVE_FUNCTION(WebAssemblyInstancePrototype::exports_getter) -{ - auto this_value = vm.this_value(); - auto* this_object = TRY(this_value.to_object(vm)); - if (!is(this_object)) - return vm.throw_completion(JS::ErrorType::NotAnObjectOfType, "WebAssembly.Instance"); - auto object = static_cast(this_object); - return object->m_exports_object; -} - -} diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h deleted file mode 100644 index 19b9b3eb01..0000000000 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2021, Ali Mohammad Pur - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#pragma once - -#include -#include -#include -#include - -namespace Web::Bindings { - -class WebAssemblyInstancePrototype final : public JS::Object { - JS_OBJECT(WebAssemblyInstancePrototype, Object); - -public: - explicit WebAssemblyInstancePrototype(JS::Realm& realm) - : JS::Object(ConstructWithPrototypeTag::Tag, *realm.intrinsics().object_prototype()) - { - } - - virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; - -private: - JS_DECLARE_NATIVE_FUNCTION(exports_getter); - static JS::Handle s_instance; -}; - -} diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp index 55c717a66b..cf02edbc64 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp @@ -4,7 +4,6 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include "WebAssemblyInstanceObject.h" #include "WebAssemblyMemoryPrototype.h" #include "WebAssemblyTableObject.h" #include "WebAssemblyTablePrototype.h" @@ -19,10 +18,11 @@ #include #include #include +#include #include #include +#include #include -#include #include namespace Web::Bindings { @@ -45,7 +45,7 @@ JS::ThrowCompletionOr WebAssemblyObject::initialize(JS::Realm& realm) auto& memory_constructor = Bindings::ensure_web_constructor(realm, "WebAssembly.Memory"sv); define_direct_property("Memory", &memory_constructor, JS::Attribute::Writable | JS::Attribute::Configurable); - auto& instance_constructor = Bindings::ensure_web_constructor(realm, "WebAssembly.Instance"sv); + auto& instance_constructor = Bindings::ensure_web_constructor(realm, "WebAssembly.Instance"sv); define_direct_property("Instance", &instance_constructor, JS::Attribute::Writable | JS::Attribute::Configurable); auto& module_constructor = Bindings::ensure_web_constructor(realm, "WebAssembly.Module"sv); @@ -345,7 +345,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::instantiate) if (result.is_error()) { promise->reject(*result.release_error().value()); } else { - auto instance_object = MUST_OR_THROW_OOM(vm.heap().allocate(realm, realm, result.release_value())); + auto instance_object = MUST_OR_THROW_OOM(vm.heap().allocate(realm, realm, result.release_value())); if (should_return_module) { auto object = JS::Object::create(realm, nullptr); object->define_direct_property("module", MUST_OR_THROW_OOM(vm.heap().allocate(realm, realm, s_compiled_modules.size() - 1)), JS::default_attributes); diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h index 0ce3089469..2f506de17f 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h @@ -9,7 +9,6 @@ #include #include #include -#include namespace Web::Bindings { diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableObject.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableObject.h index 98472e72f5..2592710c41 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableObject.h +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableObject.h @@ -9,7 +9,6 @@ #include #include #include -#include #include namespace Web::Bindings { diff --git a/Userland/Libraries/LibWeb/idl_files.cmake b/Userland/Libraries/LibWeb/idl_files.cmake index 45e70a2276..d4731013cf 100644 --- a/Userland/Libraries/LibWeb/idl_files.cmake +++ b/Userland/Libraries/LibWeb/idl_files.cmake @@ -200,6 +200,7 @@ libweb_js_bindings(UIEvents/UIEvent) libweb_js_bindings(UIEvents/WheelEvent) libweb_js_bindings(URL/URL) libweb_js_bindings(URL/URLSearchParams ITERABLE) +libweb_js_bindings(WebAssembly/Instance) libweb_js_bindings(WebAssembly/Module) libweb_js_bindings(WebGL/WebGLContextEvent) libweb_js_bindings(WebGL/WebGLRenderingContext)