diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-14 08:30:16 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-14 08:31:03 (GMT) |
commit | daf710258b1a7333a0aa54860474f6cea5829061 (patch) | |
tree | dbd4c49d1622bccdd120d0c580564822e2c1e5d8 /src/script | |
parent | 67c15753452009953d012385a17ec1e45f003721 (diff) | |
download | Qt-daf710258b1a7333a0aa54860474f6cea5829061.zip Qt-daf710258b1a7333a0aa54860474f6cea5829061.tar.gz Qt-daf710258b1a7333a0aa54860474f6cea5829061.tar.bz2 |
implement GC marking of qobject sender JS wrapper
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index f749e7c..0b3f4fd 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -101,10 +101,11 @@ struct QObjectConnection { if (senderWrapper && !senderWrapper.marked()) { // see if the sender should be marked or not - Q_ASSERT_X(false, Q_FUNC_INFO, "implement me"); -#if 0 - Q_ASSERT(JSC::asObject(senderWrapper)->inherits(&QObjectWrapperObject::info)); - QObjectWrapperObject *inst = static_cast<QObjectWrapperObject*>(JSC::asObject(senderWrapper)); + Q_ASSERT(senderWrapper.isObject(&QScriptObject::info)); + QScriptObject *scriptObject = static_cast<QScriptObject*>(JSC::asObject(senderWrapper)); + QScriptObjectDelegate *delegate = scriptObject->delegate(); + Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::QtObject)); + QObjectDelegate *inst = static_cast<QObjectDelegate*>(delegate); if ((inst->ownership() == QScriptEngine::ScriptOwnership) || ((inst->ownership() == QScriptEngine::AutoOwnership) && inst->value() && !inst->value()->parent())) { @@ -112,7 +113,6 @@ struct QObjectConnection } else { senderWrapper.mark(); } -#endif } if (receiver && !receiver.marked()) receiver.mark(); |