mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 09:52:54 +00:00
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.
This commit is contained in:
parent
320dddde6a
commit
d0efc7734a
Notes:
sideshowbarker
2024-07-18 01:43:16 +09:00
Author: https://github.com/ADKaster
Commit: d0efc7734a
Pull-request: https://github.com/SerenityOS/serenity/pull/15349
Reviewed-by: https://github.com/linusg ✅
8 changed files with 22 additions and 29 deletions
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue