From 80564c3924dd48b1564a7c5ffb12d26f91f2a6c7 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Thu, 7 Sep 2023 12:44:34 -0700 Subject: [PATCH] Remove spurious calls to GetOptionsObject These are mistakes from #2586. Spotted by Anba. Closes: #2620 --- polyfill/lib/ecmascript.mjs | 4 +--- spec/plainyearmonth.html | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/polyfill/lib/ecmascript.mjs b/polyfill/lib/ecmascript.mjs index 17138f66e5..4b57b9176c 100644 --- a/polyfill/lib/ecmascript.mjs +++ b/polyfill/lib/ecmascript.mjs @@ -4997,12 +4997,10 @@ export function AddDurationToOrSubtractDurationFromPlainYearMonth(operation, yea let { years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds } = duration; ({ days } = BalanceTimeDuration(days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds, 'day')); - options = GetOptionsObject(options); - const calendar = GetSlot(yearMonth, CALENDAR); const fieldNames = CalendarFields(calendar, ['monthCode', 'year']); const fields = PrepareTemporalFields(yearMonth, fieldNames, []); - const fieldsCopy = SnapshotOwnProperties(GetOptionsObject(fields), null); + const fieldsCopy = SnapshotOwnProperties(fields, null); fields.day = 1; let startDate = CalendarDateFromFields(calendar, fields); const sign = DurationSign(years, months, weeks, days, 0, 0, 0, 0, 0, 0); diff --git a/spec/plainyearmonth.html b/spec/plainyearmonth.html index 00ed705565..398ba5d08f 100644 --- a/spec/plainyearmonth.html +++ b/spec/plainyearmonth.html @@ -664,7 +664,6 @@

1. If _operation_ is ~subtract~, then 1. Set _duration_ to ! CreateNegatedTemporalDuration(_duration_). 1. Let _balanceResult_ be ? BalanceTimeDuration(_duration_.[[Days]], _duration_.[[Hours]], _duration_.[[Minutes]], _duration_.[[Seconds]], _duration_.[[Milliseconds]], _duration_.[[Microseconds]], _duration_.[[Nanoseconds]], *"day"*). - 1. Set _options_ to ? GetOptionsObject(_options_). 1. Let _calendar_ be _yearMonth_.[[Calendar]]. 1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"monthCode"*, *"year"* »). 1. Let _fields_ be ? PrepareTemporalFields(_yearMonth_, _fieldNames_, «»).