Fix double deletion
authorSimon Hausmann <simon.hausmann@digia.com>
Fri, 28 Mar 2014 12:04:42 +0000 (13:04 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 28 Mar 2014 12:28:46 +0000 (13:28 +0100)
commita0f82509e47ca2b8bf625cd40b83f6582a714dce
tree9575084b101752f5adf2da4f0c4c7bc6dae1db8b
parent902e73e02d34b3739c74e758234ddc78893b1711
Fix double deletion

Small regression from commit 7ae796cb141b73a1b215b2b0fd64b7ffbbd1e510.
Processing the deletables might result in the onDestruction emission, which in
turn may end up in GC allocation and thus GC runs. That in turn may result
in m_deletables processing, which at this point is nested then. For that to
work we need to set m_deletables back to zero _before_ beginning with the
iteration.

Fixes tst_qqmlecmascript with aggressive gc.

Change-Id: Ibb310b30cd496644557f4c1bb23318b18ee8f36c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/jsruntime/qv4mm.cpp