diff options
author | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2009-07-30 21:31:01 (GMT) |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2009-07-31 11:46:44 (GMT) |
commit | 819bc9a2f9f86260af8a76027a712b2a310a088d (patch) | |
tree | 48a11b945fde67434da02d8629e1de794f81a7b1 /src/3rdparty/webkit/JavaScriptCore/runtime/JSVariableObject.cpp | |
parent | b2fc6a9406f3b59f9e800e9d2d567d0dabde6cef (diff) | |
download | Qt-819bc9a2f9f86260af8a76027a712b2a310a088d.zip Qt-819bc9a2f9f86260af8a76027a712b2a310a088d.tar.gz Qt-819bc9a2f9f86260af8a76027a712b2a310a088d.tar.bz2 |
QScriptValueIterator: fix missing non-enumerable values
Added an extra argument to JSObject::getPropertyNames() that
specifies if the non-enumerable properties (those with the
DontEnum attribute set) should be included or not.
Tried looking at using a unsigned as an attribute-inclusion
or exclusion filter, but the semantics of either the calling
or the callee code would be very strange so I opted out.
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/JSVariableObject.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/JSVariableObject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSVariableObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSVariableObject.cpp index a36cefa..e67bca6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSVariableObject.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSVariableObject.cpp @@ -41,15 +41,15 @@ bool JSVariableObject::deleteProperty(ExecState* exec, const Identifier& propert return JSObject::deleteProperty(exec, propertyName); } -void JSVariableObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) +void JSVariableObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, bool includeNonEnumerable) { SymbolTable::const_iterator end = symbolTable().end(); for (SymbolTable::const_iterator it = symbolTable().begin(); it != end; ++it) { - if (!(it->second.getAttributes() & DontEnum)) + if (includeNonEnumerable || !(it->second.getAttributes() & DontEnum)) propertyNames.add(Identifier(exec, it->first.get())); } - JSObject::getPropertyNames(exec, propertyNames); + JSObject::getPropertyNames(exec, propertyNames, includeNonEnumerable); } bool JSVariableObject::getPropertyAttributes(ExecState* exec, const Identifier& propertyName, unsigned& attributes) const |