mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +00:00
LibJS: Fix "smallestUnit" property name typo in a couple of places
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/900e4bc
This commit is contained in:
@@ -359,8 +359,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::round)
|
||||
// b. Set roundTo to ! OrdinaryObjectCreate(null).
|
||||
round_to = Object::create(global_object, nullptr);
|
||||
|
||||
// FIXME: "_smallestUnit_" is a spec bug, see https://github.com/tc39/proposal-temporal/pull/1931
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "_smallestUnit_", paramString).
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString).
|
||||
MUST(round_to->create_data_property_or_throw(vm.names.smallestUnit, vm.argument(0)));
|
||||
}
|
||||
// 5. Else,
|
||||
|
||||
@@ -265,8 +265,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::round)
|
||||
// b. Set roundTo to ! OrdinaryObjectCreate(null).
|
||||
round_to = Object::create(global_object, nullptr);
|
||||
|
||||
// FIXME: "_smallestUnit_" is a spec bug, see https://github.com/tc39/proposal-temporal/pull/1931
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "_smallestUnit_", paramString).
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString).
|
||||
MUST(round_to->create_data_property_or_throw(vm.names.smallestUnit, vm.argument(0)));
|
||||
}
|
||||
// 5. Else,
|
||||
|
||||
@@ -641,8 +641,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::round)
|
||||
// b. Set roundTo to ! OrdinaryObjectCreate(null).
|
||||
round_to = Object::create(global_object, nullptr);
|
||||
|
||||
// FIXME: "_smallestUnit_" is a spec bug, see https://github.com/tc39/proposal-temporal/pull/1931
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "_smallestUnit_", paramString).
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString).
|
||||
MUST(round_to->create_data_property_or_throw(vm.names.smallestUnit, vm.argument(0)));
|
||||
}
|
||||
// 5. Else,
|
||||
|
||||
@@ -365,8 +365,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::round)
|
||||
// b. Set roundTo to ! OrdinaryObjectCreate(null).
|
||||
round_to = Object::create(global_object, nullptr);
|
||||
|
||||
// FIXME: "_smallestUnit_" is a spec bug, see https://github.com/tc39/proposal-temporal/pull/1931
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "_smallestUnit_", paramString).
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString).
|
||||
MUST(round_to->create_data_property_or_throw(vm.names.smallestUnit, vm.argument(0)));
|
||||
}
|
||||
// 5. Else,
|
||||
|
||||
@@ -1117,8 +1117,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::round)
|
||||
// b. Set roundTo to ! OrdinaryObjectCreate(null).
|
||||
round_to = Object::create(global_object, nullptr);
|
||||
|
||||
// FIXME: "_smallestUnit_" is a spec bug, see https://github.com/tc39/proposal-temporal/pull/1931
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "_smallestUnit_", paramString).
|
||||
// c. Perform ! CreateDataPropertyOrThrow(roundTo, "smallestUnit", paramString).
|
||||
MUST(round_to->create_data_property_or_throw(vm.names.smallestUnit, vm.argument(0)));
|
||||
}
|
||||
// 5. Else,
|
||||
|
||||
Reference in New Issue
Block a user