diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp index 4745a98..465435c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp +++ b/src/3rdparty/webkit/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) @@ -68,45 +75,19 @@ void StringObject::put(ExecState* exec, const Identifier& propertyName, JSValue JSObject::put(exec, propertyName, value, slot); } -bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyName, bool checkDontDelete) +bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyName) { if (propertyName == exec->propertyNames().length) return false; - bool isStrictUInt32; - unsigned i = propertyName.toStrictUInt32(&isStrictUInt32); - if (isStrictUInt32 && internalValue()->canGetIndex(i)) - return false; - return JSObject::deleteProperty(exec, propertyName, checkDontDelete); + return JSObject::deleteProperty(exec, propertyName); } -void StringObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, unsigned listedAttributes) +void StringObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { 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 |