mirror of
https://github.com/RGBCube/serenity
synced 2025-06-25 07:12:07 +00:00
LibJS: Use null-prototype objects in a few more places in Temporal
This is a normative change in the Temporal spec.
See: 334479f
This commit is contained in:
parent
3720f4bd8f
commit
ca85e157e8
2 changed files with 6 additions and 6 deletions
|
@ -742,8 +742,8 @@ ThrowCompletionOr<Object*> merge_largest_unit_option(GlobalObject& global_object
|
||||||
{
|
{
|
||||||
auto& vm = global_object.vm();
|
auto& vm = global_object.vm();
|
||||||
|
|
||||||
// 1. Let merged be OrdinaryObjectCreate(%Object.prototype%).
|
// 1. Let merged be OrdinaryObjectCreate(null).
|
||||||
auto* merged = Object::create(global_object, global_object.object_prototype());
|
auto* merged = Object::create(global_object, nullptr);
|
||||||
|
|
||||||
// 2. Let keys be ? EnumerableOwnPropertyNames(options, key).
|
// 2. Let keys be ? EnumerableOwnPropertyNames(options, key).
|
||||||
auto keys = TRY(options.enumerable_own_property_names(Object::PropertyKind::Key));
|
auto keys = TRY(options.enumerable_own_property_names(Object::PropertyKind::Key));
|
||||||
|
@ -1768,8 +1768,8 @@ ThrowCompletionOr<Object*> prepare_temporal_fields(GlobalObject& global_object,
|
||||||
{
|
{
|
||||||
auto& vm = global_object.vm();
|
auto& vm = global_object.vm();
|
||||||
|
|
||||||
// 1. Let result be OrdinaryObjectCreate(%Object.prototype%).
|
// 1. Let result be OrdinaryObjectCreate(null).
|
||||||
auto* result = Object::create(global_object, global_object.object_prototype());
|
auto* result = Object::create(global_object, nullptr);
|
||||||
VERIFY(result);
|
VERIFY(result);
|
||||||
|
|
||||||
// 2. Let any be false.
|
// 2. Let any be false.
|
||||||
|
|
|
@ -363,8 +363,8 @@ ThrowCompletionOr<PlainYearMonth*> add_duration_to_or_subtract_duration_from_pla
|
||||||
// 13. Let durationToAdd be ! CreateTemporalDuration(duration.[[Years]], duration.[[Months]], duration.[[Weeks]], balanceResult.[[Days]], 0, 0, 0, 0, 0, 0).
|
// 13. Let durationToAdd be ! CreateTemporalDuration(duration.[[Years]], duration.[[Months]], duration.[[Weeks]], balanceResult.[[Days]], 0, 0, 0, 0, 0, 0).
|
||||||
auto* duration_to_add = MUST(create_temporal_duration(global_object, duration->years(), duration->months(), duration->weeks(), balance_result.days, 0, 0, 0, 0, 0, 0));
|
auto* duration_to_add = MUST(create_temporal_duration(global_object, duration->years(), duration->months(), duration->weeks(), balance_result.days, 0, 0, 0, 0, 0, 0));
|
||||||
|
|
||||||
// 14. Let optionsCopy be OrdinaryObjectCreate(%Object.prototype%).
|
// 14. Let optionsCopy be OrdinaryObjectCreate(null).
|
||||||
auto* options_copy = Object::create(global_object, global_object.object_prototype());
|
auto* options_copy = Object::create(global_object, nullptr);
|
||||||
|
|
||||||
// 15. Let entries be ? EnumerableOwnPropertyNames(options, key+value).
|
// 15. Let entries be ? EnumerableOwnPropertyNames(options, key+value).
|
||||||
auto entries = TRY(options->enumerable_own_property_names(Object::PropertyKind::KeyAndValue));
|
auto entries = TRY(options->enumerable_own_property_names(Object::PropertyKind::KeyAndValue));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue