1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

LibJS: Fix .length attributes of various native functions

Namely the Proxy revocation, Promise resolving, Promise then/catch
finally, and Promise GetCapabilitiesExecutor functions.
They were all missing an explicit 'Attribute::Configurable' argument
and therefore incorrectly used the default attributes (writable,
enumerable, configurable).
This commit is contained in:
Linus Groh 2021-06-17 13:10:06 +01:00
parent 631d36fd98
commit d1c109be96
Notes: sideshowbarker 2024-07-18 12:08:21 +09:00
4 changed files with 6 additions and 5 deletions

View file

@ -79,7 +79,7 @@ JS_DEFINE_NATIVE_FUNCTION(ProxyConstructor::revocable)
proxy.revoke();
return js_undefined();
});
revoker->define_property(vm.names.length, Value(0));
revoker->define_property(vm.names.length, Value(0), Attribute::Configurable);
auto* result = Object::create(global_object, global_object.object_prototype());
result->define_property(vm.names.proxy, proxy);