mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +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
|
@ -86,7 +86,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_seconds)
|
|||
auto epoch_seconds_value = TRY(vm.argument(0).to_number(vm));
|
||||
|
||||
// 2. Set epochSeconds to ? NumberToBigInt(epochSeconds).
|
||||
auto* epoch_seconds = TRY(number_to_bigint(global_object, epoch_seconds_value));
|
||||
auto* epoch_seconds = TRY(number_to_bigint(vm, epoch_seconds_value));
|
||||
|
||||
// 3. Let epochNanoseconds be epochSeconds × 10^9ℤ.
|
||||
auto* epoch_nanoseconds = js_bigint(vm, epoch_seconds->big_integer().multiplied_by(Crypto::UnsignedBigInteger { 1'000'000'000 }));
|
||||
|
@ -106,7 +106,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_milliseconds)
|
|||
auto epoch_milliseconds_value = TRY(vm.argument(0).to_number(vm));
|
||||
|
||||
// 2. Set epochMilliseconds to ? NumberToBigInt(epochMilliseconds).
|
||||
auto* epoch_milliseconds = TRY(number_to_bigint(global_object, epoch_milliseconds_value));
|
||||
auto* epoch_milliseconds = TRY(number_to_bigint(vm, epoch_milliseconds_value));
|
||||
|
||||
// 3. Let epochNanoseconds be epochMilliseconds × 10^6ℤ.
|
||||
auto* epoch_nanoseconds = js_bigint(vm, epoch_milliseconds->big_integer().multiplied_by(Crypto::UnsignedBigInteger { 1'000'000 }));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue