summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@nokia.com>2009-07-30 21:31:01 (GMT)
committerTor Arne Vestbø <tor.arne.vestbo@nokia.com>2009-07-31 11:46:44 (GMT)
commit819bc9a2f9f86260af8a76027a712b2a310a088d (patch)
tree48a11b945fde67434da02d8629e1de794f81a7b1 /src/script/api/qscriptengine.cpp
parentb2fc6a9406f3b59f9e800e9d2d567d0dabde6cef (diff)
downloadQt-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/script/api/qscriptengine.cpp')
-rw-r--r--src/script/api/qscriptengine.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index ee5b076..6bf7354 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -367,7 +367,7 @@ public:
const JSC::Identifier& propertyName);
virtual bool getPropertyAttributes(JSC::ExecState*, const JSC::Identifier&,
unsigned&) const;
- virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);
+ virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, bool includeNonEnumerable = false);
public:
JSC::JSObject *customGlobalObject;
@@ -404,8 +404,8 @@ public:
virtual bool getPropertyAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName,
unsigned& attributes) const
{ return originalGlobalObject->JSC::JSGlobalObject::getPropertyAttributes(exec, propertyName, attributes); }
- virtual void getPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames)
- { originalGlobalObject->JSC::JSGlobalObject::getPropertyNames(exec, propertyNames); }
+ virtual void getPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames, bool includeNonEnumerable = false)
+ { originalGlobalObject->JSC::JSGlobalObject::getPropertyNames(exec, propertyNames, includeNonEnumerable); }
private:
JSC::JSGlobalObject *originalGlobalObject;
};
@@ -712,12 +712,12 @@ bool GlobalObject::getPropertyAttributes(JSC::ExecState* exec, const JSC::Identi
return JSC::JSGlobalObject::getPropertyAttributes(exec, propertyName, attributes);
}
-void GlobalObject::getPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames)
+void GlobalObject::getPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames, bool includeNonEnumerable)
{
if (customGlobalObject)
- customGlobalObject->getPropertyNames(exec, propertyNames);
+ customGlobalObject->getPropertyNames(exec, propertyNames, includeNonEnumerable);
else
- JSC::JSGlobalObject::getPropertyNames(exec, propertyNames);
+ JSC::JSGlobalObject::getPropertyNames(exec, propertyNames, includeNonEnumerable);
}
static JSC::JSValue JSC_HOST_CALL functionPrint(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);