Fix v8 handle management in QSGLoader
authorChris Adams <christopher.adams@nokia.com>
Thu, 6 Oct 2011 06:29:52 +0000 (16:29 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 6 Oct 2011 23:43:09 +0000 (01:43 +0200)
commite29f198b2a91b30678ebeea0d4908634e7c2b5be
tree28ff64878c827e4ae8483bafc033521795d60ec0
parent71611d0f56ff37165d31b74c55d4b35907f69543
Fix v8 handle management in QSGLoader

Previously, setting the source to a remote url and specified some
initial property values while active was false, and then setting
active to true, would cause undefined behaviour.

This commit ensures that the handles are managed correctly, and that
an appropriate v8 context exists during object creation with initial
property values specified.

Task-number: QTBUG-21868
Change-Id: I101c6546537aa05aaeb420195aca670bc71f31e1
Reviewed-on: http://codereview.qt-project.org/6109
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
src/declarative/items/qsgloader.cpp
src/declarative/qml/qdeclarativecomponent.cpp
tests/auto/declarative/qsgloader/data/initialPropertyValues.8.qml [new file with mode: 0644]
tests/auto/declarative/qsgloader/tst_qsgloader.cpp