diff --git a/src/objects/js-temporal-objects.cc b/src/objects/js-temporal-objects.cc index 581815f2ce..8803c38b05 100644 --- a/src/objects/js-temporal-objects.cc +++ b/src/objects/js-temporal-objects.cc @@ -2139,17 +2139,6 @@ Maybe ToTemporalOverflow(Isolate* isolate, Handle options, ShowOverflow::kConstrain); } -// TODO(adamk): Remove this and replace with direct usage of -// MAYBE_RETURN_ON_EXCEPTION_VALUE(). -Maybe ToTemporalOverflowForSideEffects(Isolate* isolate, - Handle options, - const char* method_name) { - MAYBE_RETURN_ON_EXCEPTION_VALUE( - isolate, ToTemporalOverflow(isolate, options, method_name), - Nothing()); - return Just(true); -} - // #sec-temporal-totemporaloffset Maybe ToTemporalOffset(Isolate* isolate, Handle options, Offset fallback, const char* method_name) { @@ -2462,8 +2451,9 @@ MaybeHandle ToTemporalDate(Isolate* isolate, return DateFromFields(isolate, calendar, fields, options); } // 4. Perform ? ToTemporalOverflow(options). - MAYBE_RETURN(ToTemporalOverflowForSideEffects(isolate, options, method_name), - Handle()); + MAYBE_RETURN_ON_EXCEPTION_VALUE( + isolate, ToTemporalOverflow(isolate, options, method_name), + Handle()); // 5. Let string be ? ToString(item). Handle string; @@ -11833,8 +11823,8 @@ MaybeHandle JSTemporalPlainDate::From( // internal slot, then if (item->IsJSTemporalPlainDate()) { // a. Perform ? ToTemporalOverflow(options). - MAYBE_RETURN( - ToTemporalOverflowForSideEffects(isolate, options, method_name), + MAYBE_RETURN_ON_EXCEPTION_VALUE( + isolate, ToTemporalOverflow(isolate, options, method_name), Handle()); // b. Return ? CreateTemporalDate(item.[[ISOYear]], item.[[ISOMonth]], // item.[[ISODay]], item.[[Calendar]]). @@ -12146,8 +12136,8 @@ MaybeHandle ToTemporalDateTime( } else { // 3. Else, // a. Perform ? ToTemporalOverflow(options). - MAYBE_RETURN( - ToTemporalOverflowForSideEffects(isolate, options, method_name), + MAYBE_RETURN_ON_EXCEPTION_VALUE( + isolate, ToTemporalOverflow(isolate, options, method_name), Handle()); // b. Let string be ? ToString(item). @@ -12196,8 +12186,8 @@ MaybeHandle JSTemporalPlainDateTime::From( // internal slot, then if (item->IsJSTemporalPlainDateTime()) { // a. Perform ? ToTemporalOverflow(options). - MAYBE_RETURN( - ToTemporalOverflowForSideEffects(isolate, options, method_name), + MAYBE_RETURN_ON_EXCEPTION_VALUE( + isolate, ToTemporalOverflow(isolate, options, method_name), Handle()); // b. Return ? CreateTemporalDateTime(item.[[ISYear]], item.[[ISOMonth]], // item.[[ISODay]], item.[[ISOHour]], item.[[ISOMinute]], @@ -13659,8 +13649,9 @@ MaybeHandle ToTemporalYearMonth( return YearMonthFromFields(isolate, calendar, fields, options); } // 4. Perform ? ToTemporalOverflow(options). - MAYBE_RETURN(ToTemporalOverflowForSideEffects(isolate, options, method_name), - Handle()); + MAYBE_RETURN_ON_EXCEPTION_VALUE( + isolate, ToTemporalOverflow(isolate, options, method_name), + Handle()); // 5. Let string be ? ToString(item). Handle string; ASSIGN_RETURN_ON_EXCEPTION(isolate, string, @@ -13716,8 +13707,8 @@ MaybeHandle JSTemporalPlainYearMonth::From( // internal slot, then if (item->IsJSTemporalPlainYearMonth()) { // a. Perform ? ToTemporalOverflow(options). - MAYBE_RETURN( - ToTemporalOverflowForSideEffects(isolate, options, method_name), + MAYBE_RETURN_ON_EXCEPTION_VALUE( + isolate, ToTemporalOverflow(isolate, options, method_name), Handle()); // b. Return ? CreateTemporalYearMonth(item.[[ISOYear]], item.[[ISOMonth]], // item.[[Calendar]], item.[[ISODay]]). @@ -15666,8 +15657,8 @@ MaybeHandle ToTemporalZonedDateTime( // 5. Else, } else { // a. Perform ? ToTemporalOverflow(options). - MAYBE_RETURN( - ToTemporalOverflowForSideEffects(isolate, options, method_name), + MAYBE_RETURN_ON_EXCEPTION_VALUE( + isolate, ToTemporalOverflow(isolate, options, method_name), Handle()); // b. Let string be ? ToString(item). Handle string; @@ -15794,8 +15785,8 @@ MaybeHandle JSTemporalZonedDateTime::From( // [[InitializedTemporalZonedDateTime]] internal slot, then if (item->IsJSTemporalZonedDateTime()) { // a. Perform ? ToTemporalOverflow(options). - MAYBE_RETURN( - ToTemporalOverflowForSideEffects(isolate, options, method_name), + MAYBE_RETURN_ON_EXCEPTION_VALUE( + isolate, ToTemporalOverflow(isolate, options, method_name), Handle()); // b. Perform ? ToTemporalDisambiguation(options).