mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
LibWeb: Remove remaining WebAssemblyObject data to the namespace file
This commit is contained in:
parent
57646c86ef
commit
8bba53bdff
9 changed files with 384 additions and 417 deletions
|
@ -10,7 +10,7 @@
|
|||
#include <LibWasm/Types.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/WebAssembly/Memory.h>
|
||||
#include <LibWeb/WebAssembly/WebAssemblyObject.h>
|
||||
#include <LibWeb/WebAssembly/WebAssembly.h>
|
||||
|
||||
namespace Web::WebAssembly {
|
||||
|
||||
|
@ -21,7 +21,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Memory>> Memory::construct_impl(JS::Realm&
|
|||
Wasm::Limits limits { descriptor.initial, move(descriptor.maximum) };
|
||||
Wasm::MemoryType memory_type { move(limits) };
|
||||
|
||||
auto address = Bindings::WebAssemblyObject::s_abstract_machine.store().allocate(memory_type);
|
||||
auto address = Detail::s_abstract_machine.store().allocate(memory_type);
|
||||
if (!address.has_value())
|
||||
return vm.throw_completion<JS::TypeError>("Wasm Memory allocation failed"sv);
|
||||
|
||||
|
@ -47,7 +47,7 @@ WebIDL::ExceptionOr<u32> Memory::grow(u32 delta)
|
|||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
auto* memory = Bindings::WebAssemblyObject::s_abstract_machine.store().get(address());
|
||||
auto* memory = Detail::s_abstract_machine.store().get(address());
|
||||
if (!memory)
|
||||
return vm.throw_completion<JS::RangeError>("Could not find the memory instance to grow"sv);
|
||||
|
||||
|
@ -64,7 +64,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::ArrayBuffer>> Memory::buffer() const
|
|||
auto& vm = this->vm();
|
||||
auto& realm = *vm.current_realm();
|
||||
|
||||
auto* memory = Bindings::WebAssemblyObject::s_abstract_machine.store().get(address());
|
||||
auto* memory = Detail::s_abstract_machine.store().get(address());
|
||||
if (!memory)
|
||||
return vm.throw_completion<JS::RangeError>("Could not find the memory instance"sv);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue