diff options
author | Bill King <bill.king@nokia.com> | 2009-12-02 22:41:34 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-12-02 22:41:34 (GMT) |
commit | 82a63405863f527028302ceaeff957f9ee5176e2 (patch) | |
tree | 445dc288777f9861611405e21c7e650c52255300 /src/script/api/qscriptengine.cpp | |
parent | 825c7cf9d5d8e83074636c2feeefc15a3062781d (diff) | |
parent | f29f1bb287c6b39bd1270802d1579f1c1d53f905 (diff) | |
download | Qt-82a63405863f527028302ceaeff957f9ee5176e2.zip Qt-82a63405863f527028302ceaeff957f9ee5176e2.tar.gz Qt-82a63405863f527028302ceaeff957f9ee5176e2.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index dc0e0d0..b6aa872 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1101,16 +1101,6 @@ void QScriptEnginePrivate::mark(JSC::MarkStack& markStack) } } -#ifndef QT_NO_QOBJECT - { - QHash<QObject*, QScript::QObjectData*>::const_iterator it; - for (it = m_qobjectData.constBegin(); it != m_qobjectData.constEnd(); ++it) { - QScript::QObjectData *qdata = it.value(); - qdata->mark(markStack); - } - } -#endif - { QHash<int, QScriptTypeInfo*>::const_iterator it; for (it = m_typeInfos.constBegin(); it != m_typeInfos.constEnd(); ++it) { @@ -1134,6 +1124,17 @@ void QScriptEnginePrivate::mark(JSC::MarkStack& markStack) context = context->parentContext(); } } + +#ifndef QT_NO_QOBJECT + markStack.drain(); // make sure everything is marked before marking qobject data + { + QHash<QObject*, QScript::QObjectData*>::const_iterator it; + for (it = m_qobjectData.constBegin(); it != m_qobjectData.constEnd(); ++it) { + QScript::QObjectData *qdata = it.value(); + qdata->mark(markStack); + } + } +#endif } bool QScriptEnginePrivate::isCollecting() const |