From d5457375e6501371c65a28a52a404a210d45aadb Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 6 Dec 2022 20:59:37 +0000 Subject: LibJS: Store NonnullGCPtr values in m_global_symbol_registry --- Userland/Libraries/LibJS/Runtime/VM.cpp | 4 ++-- Userland/Libraries/LibJS/Runtime/VM.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Userland/Libraries') diff --git a/Userland/Libraries/LibJS/Runtime/VM.cpp b/Userland/Libraries/LibJS/Runtime/VM.cpp index 476c3e5990..9155c65d5e 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.cpp +++ b/Userland/Libraries/LibJS/Runtime/VM.cpp @@ -237,8 +237,8 @@ Symbol* VM::get_global_symbol(DeprecatedString const& description) if (result.has_value()) return result.value(); - auto new_global_symbol = js_symbol(*this, description, true); - m_global_symbol_registry.set(description, new_global_symbol); + auto* new_global_symbol = js_symbol(*this, description, true); + m_global_symbol_registry.set(description, *new_global_symbol); return new_global_symbol; } diff --git a/Userland/Libraries/LibJS/Runtime/VM.h b/Userland/Libraries/LibJS/Runtime/VM.h index 1c1ff2216a..9e88ccc7a3 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.h +++ b/Userland/Libraries/LibJS/Runtime/VM.h @@ -265,7 +265,7 @@ private: StackInfo m_stack_info; // GlobalSymbolRegistry, https://tc39.es/ecma262/#table-globalsymbolregistry-record-fields - HashMap m_global_symbol_registry; + HashMap> m_global_symbol_registry; Vector()>> m_promise_jobs; -- cgit v1.2.3