1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

LibJS: Replace GlobalObject with VM in remaining AOs [Part 19/19]

This commit is contained in:
Linus Groh 2022-08-21 20:38:35 +01:00
parent 25849f8a6d
commit 56b2ae5ac0
46 changed files with 173 additions and 207 deletions

View file

@ -41,7 +41,6 @@ void BigIntConstructor::initialize(Realm& realm)
ThrowCompletionOr<Value> BigIntConstructor::call()
{
auto& vm = this->vm();
auto& global_object = this->global_object();
auto value = vm.argument(0);
@ -50,7 +49,7 @@ ThrowCompletionOr<Value> BigIntConstructor::call()
// 3. If Type(prim) is Number, return ? NumberToBigInt(prim).
if (primitive.is_number())
return TRY(number_to_bigint(global_object, primitive));
return TRY(number_to_bigint(vm, primitive));
// 4. Otherwise, return ? ToBigInt(prim).
return TRY(primitive.to_bigint(vm));