We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ff75f4 commit ab00a4dCopy full SHA for ab00a4d
Libraries/LibJS/Runtime/VM.cpp
@@ -246,8 +246,12 @@ void VM::gather_roots(HashMap<GC::Cell*, GC::HeapRoot>& roots)
246
for (auto string : m_single_ascii_character_strings)
247
roots.set(string, GC::HeapRoot { .type = GC::HeapRoot::Type::VM });
248
249
- for (auto string : m_numeric_string_cache)
+ for (auto string : m_numeric_string_cache) {
250
+ // The numeric string cache is populated lazily, so skip null entries.
251
+ if (!string)
252
+ continue;
253
254
+ }
255
256
roots.set(cached_strings.number, GC::HeapRoot { .type = GC::HeapRoot::Type::VM });
257
roots.set(cached_strings.undefined, GC::HeapRoot { .type = GC::HeapRoot::Type::VM });
0 commit comments