Fix crashes when running tst_qqmlecmascript with MM_AGGRESSIVE_GC
authorSimon Hausmann <simon.hausmann@digia.com>
Fri, 31 May 2013 07:41:54 +0000 (09:41 +0200)
committerLars Knoll <lars.knoll@digia.com>
Fri, 31 May 2013 21:01:42 +0000 (23:01 +0200)
commit4fee3da5a6057f1fc4b546def91ca0d5b55c04c0
tree0673546bc2121580d68ae7f577aa8813288f5571
parent78e450a0e289483afa7db09aa5e15e62df1540a6
Fix crashes when running tst_qqmlecmascript with MM_AGGRESSIVE_GC

Make sure to initialize the property data (especially setter/getter) in
insertMember() right away to zero, to avoid marking uninitialized objects
in code like this when the GC happens in code like this:

Property *pd = o->insertMember(...)
f = someFunctionThatAllocates();
pd->setSetter(f);

Change-Id: I55e4846c0e5027bb95a1da13df30bcf9eca28645
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/v4/qv4object.cpp
src/qml/qml/v8/qqmlbuiltinfunctions.cpp