From ed64a69fb2dd6f945a550ef56e6d29cf2b95e430 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 8 Jun 2021 19:09:14 +0100 Subject: [PATCH] LibJS: Replace two instances of 'global_object.vm()' with just 'vm' --- Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp index d9e89a20fc..eefa3ddcd3 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp @@ -24,7 +24,7 @@ void ArrayIteratorPrototype::initialize(GlobalObject& global_object) Object::initialize(global_object); define_native_function(vm.names.next, next, 0, Attribute::Configurable | Attribute::Writable); - define_property(global_object.vm().well_known_symbol_to_string_tag(), js_string(global_object.heap(), "Array Iterator"), Attribute::Configurable); + define_property(vm.well_known_symbol_to_string_tag(), js_string(global_object.heap(), "Array Iterator"), Attribute::Configurable); } ArrayIteratorPrototype::~ArrayIteratorPrototype() diff --git a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp index ba7a7e166a..1bb29d459e 100644 --- a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp @@ -66,7 +66,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::to_string) return {}; String tag; - auto to_string_tag = this_object->get(global_object.vm().well_known_symbol_to_string_tag()); + auto to_string_tag = this_object->get(vm.well_known_symbol_to_string_tag()); if (to_string_tag.is_string()) { tag = to_string_tag.as_string().string();