mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibJS: Replace GlobalObject with VM in Temporal AOs [Part 2/19]
This commit is contained in:
parent
f9705eb2f4
commit
694f66b5ca
58 changed files with 1564 additions and 1600 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Emanuele Torre <torreemanuele6@gmail.com>
|
||||
* Copyright (c) 2020-2021, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -454,8 +454,10 @@ ThrowCompletionOr<String> Console::value_vector_to_string(MarkedVector<Value> co
|
|||
|
||||
ThrowCompletionOr<String> Console::format_time_since(Core::ElapsedTimer timer)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
auto elapsed_ms = timer.elapsed_time().to_milliseconds();
|
||||
auto duration = TRY(Temporal::balance_duration(global_object(), 0, 0, 0, 0, elapsed_ms, 0, "0"_sbigint, "year"));
|
||||
auto duration = TRY(Temporal::balance_duration(vm, 0, 0, 0, 0, elapsed_ms, 0, "0"_sbigint, "year"));
|
||||
|
||||
auto append = [&](StringBuilder& builder, auto format, auto... number) {
|
||||
if (!builder.is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue