From 298c6062000754333f360c4e80368680a1da90e8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 17 Apr 2020 19:01:31 +0200 Subject: LibJS: Pass prototype to StringObject constructor --- Libraries/LibJS/Runtime/Value.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Libraries/LibJS/Runtime/Value.cpp') diff --git a/Libraries/LibJS/Runtime/Value.cpp b/Libraries/LibJS/Runtime/Value.cpp index cd400082ff..a5a6adba49 100644 --- a/Libraries/LibJS/Runtime/Value.cpp +++ b/Libraries/LibJS/Runtime/Value.cpp @@ -113,7 +113,7 @@ Object* Value::to_object(Heap& heap) const return &const_cast(as_object()); if (is_string()) - return heap.allocate(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); -- cgit v1.2.3