mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibJS: Replace GlobalObject with VM in remaining AOs [Part 19/19]
This commit is contained in:
parent
25849f8a6d
commit
56b2ae5ac0
Notes:
sideshowbarker
2024-07-17 07:53:23 +09:00
Author: https://github.com/linusg
Commit: 56b2ae5ac0
Pull-request: https://github.com/SerenityOS/serenity/pull/14973
Reviewed-by: https://github.com/davidot ✅
46 changed files with 173 additions and 207 deletions
|
@ -1133,7 +1133,6 @@ void Object::define_native_function(PropertyKey const& property_key, Function<Th
|
|||
// 20.1.2.3.1 ObjectDefineProperties ( O, Properties ), https://tc39.es/ecma262/#sec-objectdefineproperties
|
||||
ThrowCompletionOr<Object*> Object::define_properties(Value properties)
|
||||
{
|
||||
auto& global_object = this->global_object();
|
||||
auto& vm = this->vm();
|
||||
|
||||
// 1. Let props be ? ToObject(Properties).
|
||||
|
@ -1163,7 +1162,7 @@ ThrowCompletionOr<Object*> Object::define_properties(Value properties)
|
|||
auto descriptor_object = TRY(props->get(property_key));
|
||||
|
||||
// ii. Let desc be ? ToPropertyDescriptor(descObj).
|
||||
auto descriptor = TRY(to_property_descriptor(global_object, descriptor_object));
|
||||
auto descriptor = TRY(to_property_descriptor(vm, descriptor_object));
|
||||
|
||||
// iii. Append the pair (a two element List) consisting of nextKey and desc to the end of descriptors.
|
||||
descriptors.append({ property_key, descriptor });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue