mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibWeb: Replace GlobalObject with VM in WebAssembly AOs [Part 1/4]
This commit is contained in:
parent
40a70461a0
commit
5f1fe4b012
7 changed files with 34 additions and 37 deletions
|
@ -14,10 +14,10 @@
|
|||
namespace Web::Bindings {
|
||||
|
||||
class WebAssemblyMemoryObject;
|
||||
JS::ThrowCompletionOr<size_t> parse_module(JS::GlobalObject& global_object, JS::Object* buffer);
|
||||
JS::NativeFunction* create_native_function(JS::GlobalObject& global_object, Wasm::FunctionAddress address, String const& name);
|
||||
JS::Value to_js_value(JS::GlobalObject& global_object, Wasm::Value& wasm_value);
|
||||
JS::ThrowCompletionOr<Wasm::Value> to_webassembly_value(JS::GlobalObject& global_object, JS::Value value, Wasm::ValueType const& type);
|
||||
JS::ThrowCompletionOr<size_t> parse_module(JS::VM&, JS::Object* buffer);
|
||||
JS::NativeFunction* create_native_function(JS::VM&, Wasm::FunctionAddress address, String const& name);
|
||||
JS::Value to_js_value(JS::VM&, Wasm::Value& wasm_value);
|
||||
JS::ThrowCompletionOr<Wasm::Value> to_webassembly_value(JS::VM&, JS::Value value, Wasm::ValueType const& type);
|
||||
|
||||
class WebAssemblyObject final : public JS::Object {
|
||||
JS_OBJECT(WebAssemblyObject, JS::Object);
|
||||
|
@ -29,7 +29,7 @@ public:
|
|||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
static JS::ThrowCompletionOr<size_t> instantiate_module(Wasm::Module const&, JS::VM&, JS::GlobalObject&);
|
||||
static JS::ThrowCompletionOr<size_t> instantiate_module(JS::VM&, Wasm::Module const&);
|
||||
|
||||
struct CompiledWebAssemblyModule {
|
||||
explicit CompiledWebAssemblyModule(Wasm::Module&& module)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue