diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-08-21 12:56:57 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-08-21 12:56:57 (GMT) |
commit | 34679dd23213881a9632e21e4858377ff90a9006 (patch) | |
tree | deb9ebf681d4954b2d44858ca1a14d251c31e8eb /src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp | |
parent | 7669f91c33328505fbe52f4913bd3f8745b76d31 (diff) | |
parent | 4aa6869877d4906fcfaac5388294748512cace25 (diff) | |
download | Qt-34679dd23213881a9632e21e4858377ff90a9006.zip Qt-34679dd23213881a9632e21e4858377ff90a9006.tar.gz Qt-34679dd23213881a9632e21e4858377ff90a9006.tar.bz2 |
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
Conflicts:
src/corelib/io/qfilesystemwatcher_symbian.cpp
src/corelib/io/qfilesystemwatcher_symbian_p.h
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp index 415c25d..ded842d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp @@ -204,12 +204,12 @@ bool JSObject::hasProperty(ExecState* exec, unsigned propertyName) const } // ECMA 8.6.2.5 -bool JSObject::deleteProperty(ExecState* exec, const Identifier& propertyName) +bool JSObject::deleteProperty(ExecState* exec, const Identifier& propertyName, bool checkDontDelete) { unsigned attributes; JSCell* specificValue; if (m_structure->get(propertyName, attributes, specificValue) != WTF::notFound) { - if ((attributes & DontDelete)) + if ((attributes & DontDelete) && checkDontDelete) return false; removeDirect(propertyName); return true; @@ -217,7 +217,7 @@ bool JSObject::deleteProperty(ExecState* exec, const Identifier& propertyName) // Look in the static hashtable of properties const HashEntry* entry = findPropertyHashEntry(exec, propertyName); - if (entry && entry->attributes() & DontDelete) + if (entry && (entry->attributes() & DontDelete) && checkDontDelete) return false; // this builtin property can't be deleted // FIXME: Should the code here actually do some deletion? @@ -230,9 +230,9 @@ bool JSObject::hasOwnProperty(ExecState* exec, const Identifier& propertyName) c return const_cast<JSObject*>(this)->getOwnPropertySlot(exec, propertyName, slot); } -bool JSObject::deleteProperty(ExecState* exec, unsigned propertyName) +bool JSObject::deleteProperty(ExecState* exec, unsigned propertyName, bool checkDontDelete) { - return deleteProperty(exec, Identifier::from(exec, propertyName)); + return deleteProperty(exec, Identifier::from(exec, propertyName), checkDontDelete); } static ALWAYS_INLINE JSValue callDefaultValueFunction(ExecState* exec, const JSObject* object, const Identifier& propertyName) @@ -447,9 +447,9 @@ bool JSObject::getPropertySpecificValue(ExecState*, const Identifier& propertyNa return false; } -void JSObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) +void JSObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, unsigned listedAttributes) { - m_structure->getEnumerablePropertyNames(exec, propertyNames, this); + m_structure->getPropertyNames(exec, propertyNames, this, listedAttributes); } bool JSObject::toBoolean(ExecState*) const @@ -524,7 +524,12 @@ NEVER_INLINE void JSObject::fillGetterPropertySlot(PropertySlot& slot, JSValue* Structure* JSObject::createInheritorID() { +#ifdef QT_BUILD_SCRIPT_LIB + // ### QtScript needs the hasOwnProperty() calls etc. for QScriptObject + m_inheritorID = Structure::create(this, TypeInfo(ObjectType, ImplementsHasInstance)); +#else m_inheritorID = JSObject::createStructure(this); +#endif return m_inheritorID.get(); } |