diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-30 06:37:33 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-30 06:37:33 (GMT) |
commit | 828b776f0a9ff84288e6be1bbbdb91448ca1bd4d (patch) | |
tree | ce4419b9c72a9a53c3ad3de9568b9cc89f9cf0bf /src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp | |
parent | 3c3745c29d9fbae98b55a88b5ebccb0b29b4eed5 (diff) | |
parent | b83ea4276a242893c01586a5f1a2d62d54369cfa (diff) | |
download | Qt-828b776f0a9ff84288e6be1bbbdb91448ca1bd4d.zip Qt-828b776f0a9ff84288e6be1bbbdb91448ca1bd4d.tar.gz Qt-828b776f0a9ff84288e6be1bbbdb91448ca1bd4d.tar.bz2 |
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp | 19 |
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); } } |