mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibJS: Replace GlobalObject with VM in Value AOs [Part 4/19]
This is where the fun begins. :^)
This commit is contained in:
parent
f6c4a0f5d0
commit
a022e548b8
129 changed files with 1230 additions and 1325 deletions
|
@ -93,9 +93,6 @@ ThrowCompletionOr<Unicode::TimeUnit> singular_relative_time_unit(VM& vm, StringV
|
|||
// 17.5.2 PartitionRelativeTimePattern ( relativeTimeFormat, value, unit ), https://tc39.es/ecma402/#sec-PartitionRelativeTimePattern
|
||||
ThrowCompletionOr<Vector<PatternPartitionWithUnit>> partition_relative_time_pattern(VM& vm, RelativeTimeFormat& relative_time_format, double value, StringView unit)
|
||||
{
|
||||
auto& realm = *vm.current_realm();
|
||||
auto& global_object = realm.global_object();
|
||||
|
||||
// 1. Assert: relativeTimeFormat has an [[InitializedRelativeTimeFormat]] internal slot.
|
||||
// 2. Assert: Type(value) is Number.
|
||||
// 3. Assert: Type(unit) is String.
|
||||
|
@ -144,7 +141,7 @@ ThrowCompletionOr<Vector<PatternPartitionWithUnit>> partition_relative_time_patt
|
|||
// 16. If numeric is equal to "auto", then
|
||||
if (relative_time_format.numeric() == RelativeTimeFormat::Numeric::Auto) {
|
||||
// a. Let valueString be ToString(value).
|
||||
auto value_string = MUST(Value(value).to_string(global_object));
|
||||
auto value_string = MUST(Value(value).to_string(vm));
|
||||
|
||||
// b. If patterns has a field [[<valueString>]], then
|
||||
if (auto patterns = find_patterns_for_tense_or_number(value_string); !patterns.is_empty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue