summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-09-23 01:44:14 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-09-23 01:44:14 (GMT)
commitb9f7d5ebad998da0863e7f57cc1e5f1d3b6e673b (patch)
treea1fc6a13d896327a44390c00c89ba8c4ad205234 /src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp
parentc60dfe1f2732670eb48d98c9772815d37a16ec3c (diff)
parent1dfabbbb1b740060444a11cd894561aed3a884ad (diff)
downloadQt-b9f7d5ebad998da0863e7f57cc1e5f1d3b6e673b.zip
Qt-b9f7d5ebad998da0863e7f57cc1e5f1d3b6e673b.tar.gz
Qt-b9f7d5ebad998da0863e7f57cc1e5f1d3b6e673b.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/declarative/qml/qml.pri
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp
index d00b69c..421c440 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp
@@ -45,7 +45,7 @@ JSByteArray::JSByteArray(ExecState* exec, PassRefPtr<Structure> structure, ByteA
PassRefPtr<Structure> JSByteArray::createStructure(JSValue prototype)
{
- PassRefPtr<Structure> result = Structure::create(prototype, TypeInfo(ObjectType));
+ PassRefPtr<Structure> result = Structure::create(prototype, TypeInfo(ObjectType, HasDefaultMark));
return result;
}
@@ -59,7 +59,18 @@ bool JSByteArray::getOwnPropertySlot(ExecState* exec, const Identifier& property
}
return JSObject::getOwnPropertySlot(exec, propertyName, slot);
}
-
+
+bool JSByteArray::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ bool ok;
+ unsigned index = propertyName.toUInt32(&ok, false);
+ if (ok && canAccessIndex(index)) {
+ descriptor.setDescriptor(getIndex(exec, index), DontDelete);
+ return true;
+ }
+ return JSObject::getOwnPropertyDescriptor(exec, propertyName, descriptor);
+}
+
bool JSByteArray::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
if (canAccessIndex(propertyName)) {
@@ -85,12 +96,12 @@ void JSByteArray::put(ExecState* exec, unsigned propertyName, JSValue value)
setIndex(exec, propertyName, value);
}
-void JSByteArray::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, unsigned listedAttributes)
+void JSByteArray::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
{
unsigned length = m_storage->length();
for (unsigned i = 0; i < length; ++i)
propertyNames.add(Identifier::from(exec, i));
- JSObject::getPropertyNames(exec, propertyNames, listedAttributes);
+ JSObject::getOwnPropertyNames(exec, propertyNames);
}
}