mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibJS: Convert Value::invoke and VM::call to ThrowCompletionOr
This commit is contained in:
parent
a90107b02a
commit
ab594e5f2f
35 changed files with 196 additions and 328 deletions
|
@ -374,9 +374,7 @@ ThrowCompletionOr<double> get_offset_nanoseconds_for(GlobalObject& global_object
|
|||
get_offset_nanoseconds_for = global_object.temporal_time_zone_prototype_get_offset_nanoseconds_for_function();
|
||||
|
||||
// 3. Let offsetNanoseconds be ? Call(getOffsetNanosecondsFor, timeZone, « instant »).
|
||||
auto offset_nanoseconds_value = vm.call(*get_offset_nanoseconds_for, time_zone, &instant);
|
||||
if (auto* exception = vm.exception())
|
||||
return throw_completion(exception->value());
|
||||
auto offset_nanoseconds_value = TRY(vm.call(*get_offset_nanoseconds_for, time_zone, &instant));
|
||||
|
||||
// 4. If Type(offsetNanoseconds) is not Number, throw a TypeError exception.
|
||||
if (!offset_nanoseconds_value.is_number())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue