1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00: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
4 changed files with 6 additions and 5 deletions

View file

@ -27,7 +27,7 @@ PromiseResolvingFunction::PromiseResolvingFunction(Promise& promise, AlreadyReso
void PromiseResolvingFunction::initialize(GlobalObject& global_object)
{
Base::initialize(global_object);
define_property(vm().names.length, Value(1));
define_property(vm().names.length, Value(1), Attribute::Configurable);
}
Value PromiseResolvingFunction::call()