-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add internal create operations to avoid observable effects
The constructors of PlainDate, PlainDateTime, PlainMonthDay, PlainYearMonth, and ZonedDateTime call ToTemporalCalendar on the calendar argument, and the constructor of ZonedDateTime additionally calls ToTemporalTimeZone on its timeZone argument. Now that these operations include an observable HasProperty operation, we do not want to call them more than once on the same calendar or time zone object. Therefore we add CreateTemporalDate etc. which create an instance without any observable validation of the arguments. The spec text already works like this, with abstract operations such as CreateTemporalZonedDateTime and friends that do not call ToTemporalCalendar or ToTemporalTimeZone. So this is not a normative change; it's a compliance bug in the polyfill. It is required for the test262 tests in 19cd26f to pass, which observe HasProperty(`timeZone`) operations. See: #1428
- Loading branch information
Showing
10 changed files
with
478 additions
and
429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.