summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringObject.cpp')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringObject.cpp33
1 files changed, 9 insertions, 24 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringObject.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringObject.cpp
index 4745a98ff4..dd1ac5db02 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringObject.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringObject.cpp
@@ -61,6 +61,13 @@ bool StringObject::getOwnPropertySlot(ExecState* exec, unsigned propertyName, Pr
return JSObject::getOwnPropertySlot(exec, Identifier::from(exec, propertyName), slot);
}
+bool StringObject::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ if (internalValue()->getStringPropertyDescriptor(exec, propertyName, descriptor))
+ return true;
+ return JSObject::getOwnPropertyDescriptor(exec, propertyName, descriptor);
+}
+
void StringObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
{
if (propertyName == exec->propertyNames().length)
@@ -79,34 +86,12 @@ bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyNam
return JSObject::deleteProperty(exec, propertyName, checkDontDelete);
}
-void StringObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, unsigned listedAttributes)
+void StringObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, bool includeNonEnumerable)
{
int size = internalValue()->value().size();
for (int i = 0; i < size; ++i)
propertyNames.add(Identifier(exec, UString::from(i)));
- return JSObject::getPropertyNames(exec, propertyNames, listedAttributes);
-}
-
-bool StringObject::getPropertyAttributes(ExecState* exec, const Identifier& propertyName, unsigned& attributes) const
-{
- if (internalValue()->getStringPropertyAttributes(exec, propertyName, attributes))
- return true;
- return JSObject::getPropertyAttributes(exec, propertyName, attributes);
-}
-
-UString StringObject::toString(ExecState*) const
-{
- return internalValue()->value();
-}
-
-UString StringObject::toThisString(ExecState*) const
-{
- return internalValue()->value();
-}
-
-JSString* StringObject::toThisJSString(ExecState*)
-{
- return internalValue();
+ return JSObject::getOwnPropertyNames(exec, propertyNames);
}
} // namespace JSC