mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
LibJS: Convert get_method to ThrowCompletionOr
This commit is contained in:
parent
ab594e5f2f
commit
ee825d6d9e
10 changed files with 47 additions and 92 deletions
|
@ -90,9 +90,7 @@ ThrowCompletionOr<Vector<String>> calendar_fields(GlobalObject& global_object, O
|
|||
auto& vm = global_object.vm();
|
||||
|
||||
// 1. Let fields be ? GetMethod(calendar, "fields").
|
||||
auto fields = Value(&calendar).get_method(global_object, vm.names.fields);
|
||||
if (auto* exception = vm.exception())
|
||||
return throw_completion(exception->value());
|
||||
auto fields = TRY(Value(&calendar).get_method(global_object, vm.names.fields));
|
||||
|
||||
// 2. Let fieldsArray be ! CreateArrayFromList(fieldNames).
|
||||
auto field_names_values = MarkedValueList { vm.heap() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue