mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:08:10 +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
|
@ -26,7 +26,7 @@ public:
|
|||
No,
|
||||
};
|
||||
|
||||
static ThrowCompletionOr<PropertyKey> from_value(GlobalObject& global_object, Value value)
|
||||
static ThrowCompletionOr<PropertyKey> from_value(VM& vm, Value value)
|
||||
{
|
||||
if (value.is_empty())
|
||||
return PropertyKey {};
|
||||
|
@ -34,7 +34,7 @@ public:
|
|||
return PropertyKey { value.as_symbol() };
|
||||
if (value.is_integral_number() && value.as_double() >= 0 && value.as_double() < NumericLimits<u32>::max())
|
||||
return static_cast<u32>(value.as_double());
|
||||
return TRY(value.to_string(global_object));
|
||||
return TRY(value.to_string(vm));
|
||||
}
|
||||
|
||||
PropertyKey() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue