mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 08:20:44 +00:00
LibJS: Replace GlobalObject with VM in remaining AOs [Part 19/19]
This commit is contained in:
parent
25849f8a6d
commit
56b2ae5ac0
Notes:
sideshowbarker
2024-07-17 07:53:23 +09:00
Author: https://github.com/linusg
Commit: 56b2ae5ac0
Pull-request: https://github.com/SerenityOS/serenity/pull/14973
Reviewed-by: https://github.com/davidot ✅
46 changed files with 173 additions and 207 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue