Check dynamic slot function for nullness before evaluation
authorChris Adams <christopher.adams@nokia.com>
Thu, 2 Feb 2012 04:51:17 +0000 (14:51 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 9 Feb 2012 06:32:07 +0000 (07:32 +0100)
commita4b4932efb631a3c467c9bb4b3e4f99ca70a066d
treeda3f6180bab6a392c1b56e01fc62802349b4e037
parent298b86b95bd42d12e15e8d8a137cd9bee21d6094
Check dynamic slot function for nullness before evaluation

Previously, we didn't check whether the function object handle
associated with a dynamic slot's method index was null before
attempting to evaluate it, which could cause a crash in some
circumstances.  This change also adds better error reporting
during function compilation.

Task-number: QTBUG-24064
Task-number: QTBUG-24037
Task-number: QTBUG-23387
Change-Id: I3c5e35e8c16187870125736013a5935fcc5cb1f2
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
src/declarative/qml/qdeclarativeexpression.cpp
src/declarative/qml/qdeclarativevmemetaobject.cpp
tests/auto/declarative/qdeclarativeecmascript/data/v8functionException.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp