1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:37:35 +00:00

LibJS: Set the function names for the resolve, reject, and executor

These should all have a name with an empty string. Not only does test262
verify this, but it also verifies that (for the executor) the name
property is defined after the length property.
This commit is contained in:
Timothy Flynn 2021-08-21 17:15:08 -04:00 committed by Linus Groh
parent 5b303721e0
commit 98d8a858cd
2 changed files with 3 additions and 2 deletions

View file

@ -43,6 +43,7 @@ PromiseCapability new_promise_capability(GlobalObject& global_object, Value cons
return js_undefined();
});
executor->define_direct_property(vm.names.length, Value(2), Attribute::Configurable);
executor->define_direct_property(vm.names.name, js_string(vm, String::empty()), Attribute::Configurable);
MarkedValueList arguments(vm.heap());
arguments.append(executor);