diff options
Diffstat (limited to 'Libraries/LibJS/StringObject.cpp')
-rw-r--r-- | Libraries/LibJS/StringObject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibJS/StringObject.cpp b/Libraries/LibJS/StringObject.cpp index fbb1ec32f3..6eb09ff4f2 100644 --- a/Libraries/LibJS/StringObject.cpp +++ b/Libraries/LibJS/StringObject.cpp @@ -25,6 +25,7 @@ */ #include <LibJS/Heap.h> +#include <LibJS/Interpreter.h> #include <LibJS/PrimitiveString.h> #include <LibJS/StringObject.h> #include <LibJS/StringPrototype.h> @@ -35,7 +36,7 @@ namespace JS { StringObject::StringObject(PrimitiveString* string) : m_string(string) { - set_prototype(heap().allocate<StringPrototype>()); + set_prototype(interpreter().string_prototype()); put("length", Value(static_cast<i32>(m_string->string().length()))); } |