1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:37:44 +00:00

LibWeb: Make WebAssembly.Instance.prototype.exports an accessor property

This commit is contained in:
Linus Groh 2021-07-05 12:33:08 +01:00
parent 79d8326370
commit b73b6fbd4c

View file

@ -12,10 +12,10 @@ namespace Web::Bindings {
void WebAssemblyInstancePrototype::initialize(JS::GlobalObject& global_object) void WebAssemblyInstancePrototype::initialize(JS::GlobalObject& global_object)
{ {
Object::initialize(global_object); Object::initialize(global_object);
define_native_property("exports", exports_getter, nullptr); define_native_accessor("exports", exports_getter, {});
} }
JS_DEFINE_NATIVE_GETTER(WebAssemblyInstancePrototype::exports_getter) JS_DEFINE_NATIVE_FUNCTION(WebAssemblyInstancePrototype::exports_getter)
{ {
auto this_value = vm.this_value(global_object); auto this_value = vm.this_value(global_object);
auto this_object = this_value.to_object(global_object); auto this_object = this_value.to_object(global_object);