mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +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
|
@ -172,7 +172,7 @@ void TestRunnerGlobalObject::initialize_global_object(JS::Realm& realm)
|
|||
{
|
||||
Base::initialize_global_object(realm);
|
||||
define_direct_property("global", this, JS::Attribute::Enumerable);
|
||||
define_native_function("fuzzilli", fuzzilli, 2, JS::default_attributes);
|
||||
define_native_function(realm, "fuzzilli", fuzzilli, 2, JS::default_attributes);
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue