summaryrefslogtreecommitdiffstats
path: root/src/script/bridge
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-02 10:36:12 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-02 10:36:12 (GMT)
commit55f4665a8d9bd7ccc3f59b76878f5adddd4e6d69 (patch)
treeb4be417fe3d9d0895d6476acbeebff9de760a9ec /src/script/bridge
parentdb684926cf69e329ca845c6204bbbbd5506721e6 (diff)
downloadQt-55f4665a8d9bd7ccc3f59b76878f5adddd4e6d69.zip
Qt-55f4665a8d9bd7ccc3f59b76878f5adddd4e6d69.tar.gz
Qt-55f4665a8d9bd7ccc3f59b76878f5adddd4e6d69.tar.bz2
implement marking of QObject connection
Diffstat (limited to 'src/script/bridge')
-rw-r--r--src/script/bridge/qscriptqobject.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index 3cd0091..a33f001 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -66,17 +66,18 @@ struct QObjectConnection
void mark()
{
- Q_ASSERT_X(false, Q_FUNC_INFO, "implement me");
-/* if (senderWrapper && !senderWrapper->isMarked()) {
+ if (senderWrapper && !senderWrapper.marked()) {
// see if the sender should be marked or not
- if ((inst->ownership == QScriptEngine::ScriptOwnership)
- || ((inst->ownership == QScriptEngine::AutoOwnership)
- && inst->value && !inst->value->parent())) {
- senderWrapper.invalidate();
+ Q_ASSERT(JSC::asObject(senderWrapper)->inherits(&QObjectWrapperObject::info));
+ QObjectWrapperObject *inst = static_cast<QObjectWrapperObject*>(JSC::asObject(senderWrapper));
+ if ((inst->ownership() == QScriptEngine::ScriptOwnership)
+ || ((inst->ownership() == QScriptEngine::AutoOwnership)
+ && inst->value() && !inst->value()->parent())) {
+ senderWrapper = JSC::JSValue();
} else {
- senderWrapper.mark(generation);
+ senderWrapper.mark();
}
- }*/
+ }
if (receiver)
receiver.mark();
if (slot)