diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-08-24 09:36:20 +0200 |
---|---|---|
committer | Shane Kearns <shane.kearns@sosco.com> | 2009-08-24 09:36:20 +0200 |
commit | 898cba2245b6fafa3820b44203442fedd9f7ed73 (patch) | |
tree | c7545af2a15396c7c5d79612d7073de9b4274d43 /src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp | |
parent | 6dade01b24f3fd314cb6ec9c2979348e78740a52 (diff) | |
parent | 028655065de7f989a35b63bcab583767aba9c048 (diff) |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp index fb44498a5..4745a98ff 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp @@ -68,19 +68,30 @@ void StringObject::put(ExecState* exec, const Identifier& propertyName, JSValue JSObject::put(exec, propertyName, value, slot); } -bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyName) +bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyName, bool checkDontDelete) { if (propertyName == exec->propertyNames().length) return false; - return JSObject::deleteProperty(exec, propertyName); + bool isStrictUInt32; + unsigned i = propertyName.toStrictUInt32(&isStrictUInt32); + if (isStrictUInt32 && internalValue()->canGetIndex(i)) + return false; + return JSObject::deleteProperty(exec, propertyName, checkDontDelete); } -void StringObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) +void StringObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, unsigned listedAttributes) { int size = internalValue()->value().size(); for (int i = 0; i < size; ++i) propertyNames.add(Identifier(exec, UString::from(i))); - return JSObject::getPropertyNames(exec, propertyNames); + 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 |