mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:15:07 +00:00
LibJS: Add js_string(Interpreter&, String)
This commit is contained in:
parent
d8e944e899
commit
faac43597a
11 changed files with 33 additions and 26 deletions
|
@ -67,10 +67,10 @@ Value ObjectConstructor::get_own_property_names(Interpreter& interpreter)
|
|||
if (object->is_array()) {
|
||||
auto* array = static_cast<const Array*>(object);
|
||||
for (i32 i = 0; i < array->length(); ++i)
|
||||
result->push(js_string(interpreter.heap(), String::number(i)));
|
||||
result->push(js_string(interpreter, String::number(i)));
|
||||
}
|
||||
for (auto& it : object->shape().property_table())
|
||||
result->push(js_string(interpreter.heap(), it.key));
|
||||
result->push(js_string(interpreter, it.key));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue