1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibJS: Rename VM::string_cache to deprecated_string_cache

And rename the member variable from m_string_cache to
m_deprecated_string_cache to match.
This commit is contained in:
Timothy Flynn 2023-01-13 09:41:24 -05:00 committed by Linus Groh
parent 3a004e8f1a
commit ca655f5e7d
3 changed files with 6 additions and 6 deletions

View file

@ -38,7 +38,7 @@ PrimitiveString::PrimitiveString(Utf16String string)
PrimitiveString::~PrimitiveString()
{
if (has_deprecated_string())
vm().string_cache().remove(*m_deprecated_string);
vm().deprecated_string_cache().remove(*m_deprecated_string);
}
void PrimitiveString::visit_edges(Cell::Visitor& visitor)
@ -139,7 +139,7 @@ NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, DeprecatedString s
return vm.single_ascii_character_string(ch);
}
auto& string_cache = vm.string_cache();
auto& string_cache = vm.deprecated_string_cache();
auto it = string_cache.find(string);
if (it == string_cache.end()) {
auto new_string = vm.heap().allocate_without_realm<PrimitiveString>(string);