summaryrefslogtreecommitdiffstats
path: root/src/script/bridge/qscriptglobalobject_p.h
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-18 12:26:14 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-18 12:26:14 (GMT)
commit91cb5464a35d2f461644677973ffdcc91985e7fd (patch)
tree91707880b76513c7a43a4de22b97ea5f2c98d226 /src/script/bridge/qscriptglobalobject_p.h
parenta2af6621a00cf0be03077132a271b2620a725bee (diff)
downloadQt-91cb5464a35d2f461644677973ffdcc91985e7fd.zip
Qt-91cb5464a35d2f461644677973ffdcc91985e7fd.tar.gz
Qt-91cb5464a35d2f461644677973ffdcc91985e7fd.tar.bz2
implement getter/setter proxying for Global Object and activation object
Diffstat (limited to 'src/script/bridge/qscriptglobalobject_p.h')
-rw-r--r--src/script/bridge/qscriptglobalobject_p.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/script/bridge/qscriptglobalobject_p.h b/src/script/bridge/qscriptglobalobject_p.h
index 5365a21..673f7f6 100644
--- a/src/script/bridge/qscriptglobalobject_p.h
+++ b/src/script/bridge/qscriptglobalobject_p.h
@@ -81,6 +81,10 @@ public:
unsigned&) const;
virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&,
unsigned listedAttributes = JSC::Structure::Prototype);
+ virtual void defineGetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* getterFunction);
+ virtual void defineSetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* setterFunction);
+ virtual JSC::JSValue lookupGetter(JSC::ExecState*, const JSC::Identifier& propertyName);
+ virtual JSC::JSValue lookupSetter(JSC::ExecState*, const JSC::Identifier& propertyName);
public:
JSC::JSObject *customGlobalObject;
@@ -120,6 +124,14 @@ public:
virtual void getPropertyNames(JSC::ExecState* exec, JSC::PropertyNameArray& propertyNames,
unsigned listedAttributes = JSC::Structure::Prototype)
{ originalGlobalObject->JSC::JSGlobalObject::getPropertyNames(exec, propertyNames, listedAttributes); }
+ virtual void defineGetter(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSObject* getterFunction)
+ { originalGlobalObject->JSC::JSGlobalObject::defineGetter(exec, propertyName, getterFunction); }
+ virtual void defineSetter(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSObject* setterFunction)
+ { originalGlobalObject->JSC::JSGlobalObject::defineSetter(exec, propertyName, setterFunction); }
+ virtual JSC::JSValue lookupGetter(JSC::ExecState* exec, const JSC::Identifier& propertyName)
+ { return originalGlobalObject->JSC::JSGlobalObject::lookupGetter(exec, propertyName); }
+ virtual JSC::JSValue lookupSetter(JSC::ExecState* exec, const JSC::Identifier& propertyName)
+ { return originalGlobalObject->JSC::JSGlobalObject::lookupSetter(exec, propertyName); }
private:
JSC::JSGlobalObject *originalGlobalObject;
};