LibJS: Cache bytecode constant strings with their Utf16String as key

This commit is contained in:
Andreas Kling 2025-10-04 15:52:10 +02:00 committed by Andreas Kling
commit 46c6176235
Notes: github-actions[bot] 2025-10-05 19:45:04 +00:00
2 changed files with 2 additions and 2 deletions

View file

@ -1358,7 +1358,7 @@ ScopedOperand Generator::add_constant(Value value)
});
}
if (value.is_string()) {
auto as_string = value.as_string().utf8_string();
auto as_string = value.as_string().utf16_string();
return m_string_constants.ensure(as_string, [&] {
return append_new_constant();
});