mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:37:36 +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
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);
|
auto* object = vm.argument(0).to_object(global_object);
|
||||||
if (vm.exception())
|
if (vm.exception())
|
||||||
return {};
|
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())
|
if (vm.exception())
|
||||||
return {};
|
return {};
|
||||||
return object->get_own_property_descriptor_object(property_key);
|
return object->get_own_property_descriptor_object(property_key);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue