diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/StringObject.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/StringObject.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/runtime/StringObject.cpp b/Source/JavaScriptCore/runtime/StringObject.cpp index 1dac06b46..3c037bcd1 100644 --- a/Source/JavaScriptCore/runtime/StringObject.cpp +++ b/Source/JavaScriptCore/runtime/StringObject.cpp @@ -22,6 +22,7 @@ #include "StringObject.h" #include "Error.h" +#include "JSGlobalObject.h" #include "PropertyNameArray.h" namespace JSC { @@ -143,4 +144,11 @@ void StringObject::getOwnPropertyNames(JSObject* object, ExecState* exec, Proper return JSObject::getOwnPropertyNames(thisObject, exec, propertyNames, mode); } +StringObject* constructString(ExecState* exec, JSGlobalObject* globalObject, JSValue string) +{ + StringObject* object = StringObject::create(exec, globalObject->stringObjectStructure()); + object->setInternalValue(exec->globalData(), string); + return object; +} + } // namespace JSC |