1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

LibJS: Make CreateTemporalDuration return a NonnullGCPtr

Since it can't return null.

This also results in a bunch of fallout from callers who were
expecting a raw pointer.
This commit is contained in:
Shannon Booth 2024-02-10 14:41:30 +13:00 committed by Tim Flynn
parent fdfe06bb44
commit 6d4eda0028
17 changed files with 52 additions and 52 deletions

View file

@ -312,7 +312,7 @@ ThrowCompletionOr<String> temporal_instant_to_string(VM& vm, Instant& instant, V
}
// 8.5.9 DifferenceTemporalInstant ( operation, instant, other, options ), https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalinstant
ThrowCompletionOr<Duration*> difference_temporal_instant(VM& vm, DifferenceOperation operation, Instant const& instant, Value other_value, Value options)
ThrowCompletionOr<NonnullGCPtr<Duration>> difference_temporal_instant(VM& vm, DifferenceOperation operation, Instant const& instant, Value other_value, Value options)
{
// 1. If operation is since, let sign be -1. Otherwise, let sign be 1.
i8 sign = operation == DifferenceOperation::Since ? -1 : 1;