mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibJS: Replace GlobalObject with VM in common AOs [Part 18/19]
This commit is contained in:
parent
7856886ed5
commit
25849f8a6d
95 changed files with 536 additions and 677 deletions
|
@ -46,13 +46,12 @@ ThrowCompletionOr<Value> PluralRulesConstructor::call()
|
|||
ThrowCompletionOr<Object*> PluralRulesConstructor::construct(FunctionObject& new_target)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
auto& global_object = this->global_object();
|
||||
|
||||
auto locales = vm.argument(0);
|
||||
auto options = vm.argument(1);
|
||||
|
||||
// 2. Let pluralRules be ? OrdinaryCreateFromConstructor(NewTarget, "%PluralRules.prototype%", « [[InitializedPluralRules]], [[Locale]], [[Type]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], [[MaximumFractionDigits]], [[MinimumSignificantDigits]], [[MaximumSignificantDigits]], [[RoundingType]] »).
|
||||
auto* plural_rules = TRY(ordinary_create_from_constructor<PluralRules>(global_object, new_target, &GlobalObject::intl_plural_rules_prototype));
|
||||
auto* plural_rules = TRY(ordinary_create_from_constructor<PluralRules>(vm, new_target, &GlobalObject::intl_plural_rules_prototype));
|
||||
|
||||
// 3. Return ? InitializePluralRules(pluralRules, locales, options).
|
||||
return TRY(initialize_plural_rules(vm, *plural_rules, locales, options));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue