diff options
author | Andrew Kaster <akaster@serenityos.org> | 2022-09-25 18:05:03 -0600 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-01 21:05:32 +0100 |
commit | d0efc7734aba153934a565fad240e3a586de5afb (patch) | |
tree | d84fa255a50ed5c2c058e49d14c9eabb4b10c262 /Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp | |
parent | 320dddde6a382c16a73020e065076909ad61a300 (diff) | |
download | serenity-d0efc7734aba153934a565fad240e3a586de5afb.zip |
LibWeb: Remove unecessary dependence on Window from WebAssembly classes
These classes only needed Window to get at its realm. Pass a realm
directly to construct WebAssembly classes.
Diffstat (limited to 'Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp index 821fe58480..7d937fe963 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObject.cpp @@ -10,7 +10,7 @@ #include <LibJS/Runtime/BigInt.h> #include <LibJS/Runtime/TypedArray.h> #include <LibWasm/AbstractMachine/Interpreter.h> -#include <LibWeb/HTML/Window.h> +#include <LibWeb/Bindings/Intrinsics.h> #include <LibWeb/WebAssembly/WebAssemblyInstanceObject.h> #include <LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h> #include <LibWeb/WebAssembly/WebAssemblyObject.h> @@ -18,7 +18,7 @@ namespace Web::Bindings { WebAssemblyInstanceObject::WebAssemblyInstanceObject(JS::Realm& realm, size_t index) - : Object(static_cast<Web::HTML::Window&>(realm.global_object()).ensure_web_prototype<WebAssemblyInstancePrototype>("WebAssemblyInstancePrototype")) + : Object(Bindings::ensure_web_prototype<WebAssemblyInstancePrototype>(realm, "WebAssemblyInstancePrototype")) , m_index(index) { } |