mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
LibJS: Implement the GetMethod() abstract operation as a Value method
This was a standalone function previously (get_method()), but instead of passing a Value to it, we can just make it a method. Also add spec step comments and fix the receiver value by using GetV().
This commit is contained in:
parent
31f5797e89
commit
337ad6d15c
8 changed files with 48 additions and 41 deletions
|
@ -101,7 +101,7 @@ void iterator_close(Object& iterator)
|
|||
vm.unwind(unwind_until, unwind_until_label);
|
||||
};
|
||||
|
||||
auto return_method = get_method(global_object, &iterator, vm.names.return_);
|
||||
auto return_method = Value(&iterator).get_method(global_object, vm.names.return_);
|
||||
if (!return_method)
|
||||
return restore_completion(); // If return is undefined, return Completion(completion).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue