summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-26 11:34:42 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-26 11:37:24 (GMT)
commit5a22a926f8f10597a431036533550f05fdf52d85 (patch)
tree0c5702cd4acff056c32f6949fe19b95a0de7c8eb /src/script
parent878569545a06a904635b273c862a0c41dba298e2 (diff)
downloadQt-5a22a926f8f10597a431036533550f05fdf52d85.zip
Qt-5a22a926f8f10597a431036533550f05fdf52d85.tar.gz
Qt-5a22a926f8f10597a431036533550f05fdf52d85.tar.bz2
implement proxying of JSObject::putWithAttributes() on Global Object
Otherwise the property is stored on the wrong object (the proxy). This fix makes the Qt bindings generated by qtscriptgenerator work again.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/bridge/qscriptglobalobject.cpp9
-rw-r--r--src/script/bridge/qscriptglobalobject_p.h4
2 files changed, 13 insertions, 0 deletions
diff --git a/src/script/bridge/qscriptglobalobject.cpp b/src/script/bridge/qscriptglobalobject.cpp
index c929e12..3fa5879 100644
--- a/src/script/bridge/qscriptglobalobject.cpp
+++ b/src/script/bridge/qscriptglobalobject.cpp
@@ -100,6 +100,15 @@ void GlobalObject::put(JSC::ExecState* exec, const JSC::Identifier& propertyName
JSC::JSGlobalObject::put(exec, propertyName, value, slot);
}
+void GlobalObject::putWithAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName,
+ JSC::JSValue value, unsigned attributes)
+{
+ if (customGlobalObject)
+ customGlobalObject->putWithAttributes(exec, propertyName, value, attributes);
+ else
+ JSC::JSGlobalObject::putWithAttributes(exec, propertyName, value, attributes);
+}
+
bool GlobalObject::deleteProperty(JSC::ExecState* exec,
const JSC::Identifier& propertyName, bool checkDontDelete)
{
diff --git a/src/script/bridge/qscriptglobalobject_p.h b/src/script/bridge/qscriptglobalobject_p.h
index eff24a2..11b1482 100644
--- a/src/script/bridge/qscriptglobalobject_p.h
+++ b/src/script/bridge/qscriptglobalobject_p.h
@@ -74,6 +74,8 @@ public:
JSC::PropertySlot&);
virtual void put(JSC::ExecState* exec, const JSC::Identifier& propertyName,
JSC::JSValue, JSC::PutPropertySlot&);
+ virtual void putWithAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName,
+ JSC::JSValue value, unsigned attributes);
virtual bool deleteProperty(JSC::ExecState*,
const JSC::Identifier& propertyName,
bool checkDontDelete = true);
@@ -115,6 +117,8 @@ public:
virtual void put(JSC::ExecState* exec, const JSC::Identifier& propertyName,
JSC::JSValue value, JSC::PutPropertySlot& slot)
{ originalGlobalObject->JSC::JSGlobalObject::put(exec, propertyName, value, slot); }
+ virtual void putWithAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue value, unsigned attributes)
+ { originalGlobalObject->JSC::JSGlobalObject::putWithAttributes(exec, propertyName, value, attributes); }
virtual bool deleteProperty(JSC::ExecState* exec,
const JSC::Identifier& propertyName, bool checkDontDelete = true)
{ return originalGlobalObject->JSC::JSGlobalObject::deleteProperty(exec, propertyName, checkDontDelete); }