mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibJS: Pass Realm to define_native_{accessor,function}()
This is needed so that the allocated NativeFunction receives the correct realm, usually forwarded from the Object's initialize() function, rather than using the current realm.
This commit is contained in:
parent
7c468b5a77
commit
e3895e6c80
116 changed files with 893 additions and 890 deletions
|
@ -153,8 +153,8 @@ TESTJS_GLOBAL_FUNCTION(compare_typed_arrays, compareTypedArrays)
|
|||
void WebAssemblyModule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
define_native_function("getExport", get_export, 1, JS::default_attributes);
|
||||
define_native_function("invoke", wasm_invoke, 1, JS::default_attributes);
|
||||
define_native_function(realm, "getExport", get_export, 1, JS::default_attributes);
|
||||
define_native_function(realm, "invoke", wasm_invoke, 1, JS::default_attributes);
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(WebAssemblyModule::get_export)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue