1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 05:48:12 +00:00

LibJS: Make the options arg of InterpretTemporalDateTimeFields nullable

This fixes "reference binding to null pointer" UBSan warnings.
This commit is contained in:
Daniel Bertalan 2023-06-29 20:41:37 +02:00 committed by Andreas Kling
parent 6eb06384b3
commit 1dce1994eb
6 changed files with 9 additions and 9 deletions

View file

@ -605,7 +605,7 @@ ThrowCompletionOr<Value> to_relative_temporal_object(VM& vm, Object const& optio
MUST(date_options->create_data_property_or_throw(vm.names.overflow, MUST_OR_THROW_OOM(PrimitiveString::create(vm, "constrain"sv))));
// h. Let result be ? InterpretTemporalDateTimeFields(calendar, fields, dateOptions).
result = TRY(interpret_temporal_date_time_fields(vm, *calendar, *fields, *date_options));
result = TRY(interpret_temporal_date_time_fields(vm, *calendar, *fields, date_options));
// i. Let offsetString be ? Get(value, "offset").
offset_string = TRY(value_object.get(vm.names.offset));