diff options
author | Linus Groh <mail@linusgroh.de> | 2022-06-14 23:58:25 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-06-15 17:49:20 +0100 |
commit | fafc9b07c4c7a8cc83a9eff1dfaed30dac597bb0 (patch) | |
tree | 76eb4edd0337918762ea39a18a94d30214260fc1 /Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp | |
parent | be2c86002a930a3b83c016f6dd873517a9e4e0b6 (diff) | |
download | serenity-fafc9b07c4c7a8cc83a9eff1dfaed30dac597bb0.zip |
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
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<PlainYearMonth&>(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). |