summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-03 12:00:27 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-03 12:00:27 (GMT)
commitc23be3111ec279b4e19ca9c37a0d9eddb756f402 (patch)
tree5e90a4e111938dc01e405eae82baff8b12cdb88b /src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp
parentd1cf24277dd736a873c20dd3aebea9d185636a78 (diff)
downloadQt-c23be3111ec279b4e19ca9c37a0d9eddb756f402.zip
Qt-c23be3111ec279b4e19ca9c37a0d9eddb756f402.tar.gz
Qt-c23be3111ec279b4e19ca9c37a0d9eddb756f402.tar.bz2
Attributes and deletion of String object properties
As per ECMA-262.
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp
index fb44498..df40691 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp
@@ -72,6 +72,10 @@ bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyNam
{
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);
}
@@ -83,6 +87,13 @@ void StringObject::getPropertyNames(ExecState* exec, PropertyNameArray& property
return JSObject::getPropertyNames(exec, propertyNames);
}
+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();