diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-06 20:59:37 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-07 09:58:59 +0000 |
commit | d5457375e6501371c65a28a52a404a210d45aadb (patch) | |
tree | 609f80a42e336fc78af59fce5cfa525cb7f412e7 /Userland/Libraries/LibJS | |
parent | 2c579ed0df8cb058e65f0c88b658a08785276f73 (diff) | |
download | serenity-d5457375e6501371c65a28a52a404a210d45aadb.zip |
LibJS: Store NonnullGCPtr<Symbol> values in m_global_symbol_registry
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/VM.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/VM.h | 2 |
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; |