mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Pass prototype to StringObject constructor
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 07:31:41 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/298c6062000
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user