1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

LibJS: Convert Object::get() to ThrowCompletionOr

To no one's surprise, this patch is pretty big - this is possibly the
most used AO of all of them. Definitely worth it though.
This commit is contained in:
Linus Groh 2021-10-02 23:52:27 +01:00
parent 9b6c09e2c4
commit b7e5f08e56
61 changed files with 326 additions and 686 deletions

View file

@ -333,9 +333,7 @@ ThrowCompletionOr<Object*> to_temporal_time_zone(GlobalObject& global_object, Va
return &temporal_time_zone_like.as_object();
// c. Set temporalTimeZoneLike to ? Get(temporalTimeZoneLike, "timeZone").
temporal_time_zone_like = temporal_time_zone_like.as_object().get(vm.names.timeZone);
if (auto* exception = vm.exception())
return throw_completion(exception->value());
temporal_time_zone_like = TRY(temporal_time_zone_like.as_object().get(vm.names.timeZone));
// d. If Type(temporalTimeZoneLike) is Object and ? HasProperty(temporalTimeZoneLike, "timeZone") is false, return temporalTimeZoneLike.
if (temporal_time_zone_like.is_object()) {