mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-02 04:20:28 +00:00
LibJS: Fix Vector<Value> => MarkedValueList in calendar_fields()
We need to ensure the temporary PrimitiveString cells don't get GC'd.
This commit is contained in:
parent
53c44bea00
commit
5b12542d39
Notes:
sideshowbarker
2024-07-18 07:13:47 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/5b12542d391 Pull-request: https://github.com/SerenityOS/serenity/pull/9273 Reviewed-by: https://github.com/IdanHo ✅
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ Vector<String> calendar_fields(GlobalObject& global_object, Object& calendar, Ve
|
|||
return {};
|
||||
|
||||
// 2. Let fieldsArray be ! CreateArrayFromList(fieldNames).
|
||||
Vector<Value> field_names_values;
|
||||
auto field_names_values = MarkedValueList { vm.heap() };
|
||||
for (auto& field_name : field_names)
|
||||
field_names_values.append(js_string(vm, field_name));
|
||||
Value fields_array = Array::create_from(global_object, field_names_values);
|
||||
|
|
Loading…
Reference in a new issue