summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibJS/Runtime/VM.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/VM.h2
2 files changed, 3 insertions, 3 deletions
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<DeprecatedString, Symbol*> m_global_symbol_registry;
+ HashMap<DeprecatedString, NonnullGCPtr<Symbol>> m_global_symbol_registry;
Vector<Function<ThrowCompletionOr<Value>()>> m_promise_jobs;