mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Use ToPropertyKey in Object.getOwnPropertyDescriptor
The specification requires this. (And the current usage of PropertyName::from_value is invalid since integers are not allowed in this context)
This commit is contained in:
parent
1c51edb639
commit
f9395efaac
Notes:
sideshowbarker
2024-07-18 12:42:55 +09:00
Author: https://github.com/IdanHo
Commit: f9395efaac
Pull-request: https://github.com/SerenityOS/serenity/pull/7877
Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_own_property_descriptor)
|
|||
auto* object = vm.argument(0).to_object(global_object);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto property_key = PropertyName::from_value(global_object, vm.argument(1));
|
||||
auto property_key = vm.argument(1).to_property_key(global_object);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
return object->get_own_property_descriptor_object(property_key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue