1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

LibJS: Read properties from the Intl.DateTimeFormat options object once

This is a normative change in the ECMA-402 spec. See:
02bd03a

This is observable just due to reading the properties one less time. It
would have been possible for e.g. the property values to change between
those invocations.
This commit is contained in:
Timothy Flynn 2023-07-21 22:13:44 -04:00 committed by Linus Groh
parent 3a4cdf77ba
commit 8b23bbf58e
5 changed files with 154 additions and 173 deletions

View file

@ -13,7 +13,7 @@
namespace JS::Intl {
// 11.5.5 DateTime Format Functions, https://tc39.es/ecma402/#sec-datetime-format-functions
// 11.5.4 DateTime Format Functions, https://tc39.es/ecma402/#sec-datetime-format-functions
NonnullGCPtr<DateTimeFormatFunction> DateTimeFormatFunction::create(Realm& realm, DateTimeFormat& date_time_format)
{
return realm.heap().allocate<DateTimeFormatFunction>(realm, date_time_format, realm.intrinsics().function_prototype()).release_allocated_value_but_fixme_should_propagate_errors();