From fafc9b07c4c7a8cc83a9eff1dfaed30dac597bb0 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 14 Jun 2022 23:58:25 +0100 Subject: LibJS: Mark AO calls creating a copy of built-in objects as infallible This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/536f067 --- .../Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp') diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp index 49fc644549..930b749079 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp @@ -99,8 +99,8 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthConstructor::from) auto& plain_year_month_object = static_cast(item.as_object()); - // b. Return ? CreateTemporalYearMonth(item.[[ISOYear]], item.[[ISOMonth]], item.[[Calendar]], item.[[ISODay]]). - return TRY(create_temporal_year_month(global_object, plain_year_month_object.iso_year(), plain_year_month_object.iso_month(), plain_year_month_object.calendar(), plain_year_month_object.iso_day())); + // b. Return ! CreateTemporalYearMonth(item.[[ISOYear]], item.[[ISOMonth]], item.[[Calendar]], item.[[ISODay]]). + return MUST(create_temporal_year_month(global_object, plain_year_month_object.iso_year(), plain_year_month_object.iso_month(), plain_year_month_object.calendar(), plain_year_month_object.iso_day())); } // 3. Return ? ToTemporalYearMonth(item, options). -- cgit v1.2.3