summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Console.cpp')
-rw-r--r--Userland/Libraries/LibJS/Console.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Console.cpp b/Userland/Libraries/LibJS/Console.cpp
index 2d2bfadf79..732cfd4ef5 100644
--- a/Userland/Libraries/LibJS/Console.cpp
+++ b/Userland/Libraries/LibJS/Console.cpp
@@ -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())