summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Encoding/TextEncoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Encoding/TextEncoder.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Encoding/TextEncoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Encoding/TextEncoder.cpp b/Userland/Libraries/LibWeb/Encoding/TextEncoder.cpp
index 7a71b0ad6b..bf2b1e5139 100644
--- a/Userland/Libraries/LibWeb/Encoding/TextEncoder.cpp
+++ b/Userland/Libraries/LibWeb/Encoding/TextEncoder.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
+ * Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -14,8 +14,8 @@ namespace Web::Encoding {
// https://encoding.spec.whatwg.org/#dom-textencoder-encode
JS::Uint8Array* TextEncoder::encode(String const& input) const
{
- auto& global_object = wrapper()->global_object();
- auto& realm = *global_object.associated_realm();
+ auto& vm = wrapper()->vm();
+ auto& realm = *vm.current_realm();
// NOTE: The AK::String returned from PrimitiveString::string() is always UTF-8, regardless of the internal string type, so most of these steps are no-ops.