|
@@ -342,7 +342,7 @@ JS::ThrowCompletionOr<NonnullRefPtr<CompiledWebAssemblyModule>> parse_module(JS:
|
|
return compiled_module;
|
|
return compiled_module;
|
|
}
|
|
}
|
|
|
|
|
|
-JS::NativeFunction* create_native_function(JS::VM& vm, Wasm::FunctionAddress address, ByteString const& name)
|
|
|
|
|
|
+JS::NativeFunction* create_native_function(JS::VM& vm, Wasm::FunctionAddress address, ByteString const& name, Instance* instance)
|
|
{
|
|
{
|
|
auto& realm = *vm.current_realm();
|
|
auto& realm = *vm.current_realm();
|
|
Optional<Wasm::FunctionType> type;
|
|
Optional<Wasm::FunctionType> type;
|
|
@@ -354,7 +354,8 @@ JS::NativeFunction* create_native_function(JS::VM& vm, Wasm::FunctionAddress add
|
|
auto function = JS::NativeFunction::create(
|
|
auto function = JS::NativeFunction::create(
|
|
realm,
|
|
realm,
|
|
name,
|
|
name,
|
|
- [address, type = type.release_value()](JS::VM& vm) -> JS::ThrowCompletionOr<JS::Value> {
|
|
|
|
|
|
+ [address, type = type.release_value(), instance](JS::VM& vm) -> JS::ThrowCompletionOr<JS::Value> {
|
|
|
|
+ (void)instance;
|
|
auto& realm = *vm.current_realm();
|
|
auto& realm = *vm.current_realm();
|
|
Vector<Wasm::Value> values;
|
|
Vector<Wasm::Value> values;
|
|
values.ensure_capacity(type.parameters().size());
|
|
values.ensure_capacity(type.parameters().size());
|