mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:37:45 +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
|
@ -365,9 +365,7 @@ ThrowCompletionOr<double> get_offset_nanoseconds_for(GlobalObject& global_object
|
|||
auto& vm = global_object.vm();
|
||||
|
||||
// 1. Let getOffsetNanosecondsFor be ? GetMethod(timeZone, "getOffsetNanosecondsFor").
|
||||
auto* get_offset_nanoseconds_for = time_zone.get_method(global_object, vm.names.getOffsetNanosecondsFor);
|
||||
if (auto* exception = vm.exception())
|
||||
return throw_completion(exception->value());
|
||||
auto* get_offset_nanoseconds_for = TRY(time_zone.get_method(global_object, vm.names.getOffsetNanosecondsFor));
|
||||
|
||||
// 2. If getOffsetNanosecondsFor is undefined, set getOffsetNanosecondsFor to %Temporal.TimeZone.prototype.getOffsetNanosecondsFor%.
|
||||
if (!get_offset_nanoseconds_for)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue