Return a Heap object from the getter()/setter() methods of Property
authorLars Knoll <lars.knoll@theqtcompany.com>
Wed, 3 Dec 2014 09:42:07 +0000 (10:42 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Sat, 20 Dec 2014 11:00:04 +0000 (12:00 +0100)
commitdb7b7d4161048ec481d80deaac5ff8cfa9487626
tree752f9935485909f936c6adbcfd847cfa4763c85e
parent42aba3076dc9b6c4f8f35dd79cbf2992f7373d4f
Return a Heap object from the getter()/setter() methods of Property

We actually need to put the returned value into a ScopedFunctionObject
before calling it, as the Property could get deleted during the call
leading to a dangling pointer. With a GC that moves objects this will
become even more important.

Change-Id: I43bece6f80eb3501c1291065846e230a59ae8aed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jsruntime/qv4argumentsobject.cpp
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4lookup.cpp
src/qml/jsruntime/qv4object.cpp
src/qml/jsruntime/qv4property_p.h