diff options
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 17 |
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) |