From e8043818e92c275884f1a29ed740f8f82b0bc084 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 6 Aug 2009 12:53:47 +0200 Subject: make iteration work for the global object again Follow-up to commit 520378cfedd63544a9689687256d2c89352ee561 --- src/script/bridge/qscriptglobalobject.cpp | 6 +++--- src/script/bridge/qscriptglobalobject_p.h | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/script/bridge/qscriptglobalobject.cpp b/src/script/bridge/qscriptglobalobject.cpp index 2da7a98..032ee25 100644 --- a/src/script/bridge/qscriptglobalobject.cpp +++ b/src/script/bridge/qscriptglobalobject.cpp @@ -116,12 +116,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, bool includeNonEnumerable) +void GlobalObject::getPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames, unsigned listedAttributes) { if (customGlobalObject) - customGlobalObject->getPropertyNames(exec, propertyNames, includeNonEnumerable); + customGlobalObject->getPropertyNames(exec, propertyNames, listedAttributes); else - JSC::JSGlobalObject::getPropertyNames(exec, propertyNames, includeNonEnumerable); + JSC::JSGlobalObject::getPropertyNames(exec, propertyNames, listedAttributes); } } // namespace QScript diff --git a/src/script/bridge/qscriptglobalobject_p.h b/src/script/bridge/qscriptglobalobject_p.h index 8b44693..47e35b2 100644 --- a/src/script/bridge/qscriptglobalobject_p.h +++ b/src/script/bridge/qscriptglobalobject_p.h @@ -81,7 +81,8 @@ public: bool checkDontDelete = true); virtual bool getPropertyAttributes(JSC::ExecState*, const JSC::Identifier&, unsigned&) const; - virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, bool includeNonEnumerable = false); + virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, + unsigned listedAttributes = JSC::Structure::Prototype); public: JSC::JSObject *customGlobalObject; @@ -118,8 +119,9 @@ 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, bool includeNonEnumerable = false) - { originalGlobalObject->JSC::JSGlobalObject::getPropertyNames(exec, propertyNames, includeNonEnumerable); } + virtual void getPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames, + unsigned listedAttributes = JSC::Structure::Prototype) + { originalGlobalObject->JSC::JSGlobalObject::getPropertyNames(exec, propertyNames, listedAttributes); } private: JSC::JSGlobalObject *originalGlobalObject; }; -- cgit v0.12