mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 09:07:44 +00:00
LibJS: Pass prototype to StringObject constructor
This commit is contained in:
parent
cf702a13b9
commit
298c606200
5 changed files with 23 additions and 12 deletions
|
@ -113,7 +113,7 @@ Object* Value::to_object(Heap& heap) const
|
|||
return &const_cast<Object&>(as_object());
|
||||
|
||||
if (is_string())
|
||||
return heap.allocate<StringObject>(m_value.as_string);
|
||||
return StringObject::create(heap.interpreter().global_object(), *m_value.as_string);
|
||||
|
||||
if (is_number())
|
||||
return NumberObject::create(heap.interpreter().global_object(), m_value.as_double);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue