aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2011-12-29 10:32:52 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-29 05:52:22 +0100
commit8eec0518d628b59d4e6bfe3ee68ddabb1f83df08 (patch)
tree8ce268e05c6fe00ee199737b2a45561c37d9b6eb /tests/auto/declarative/qdeclarativeecmascript/data
parent78100927823edf9001d31c33162c634b5e4cf9d4 (diff)
Handle exceptions inside QV8QObjectConnectionList::qt_metacall
Previously, exceptions were not handled in the connectionlist. This could cause v8 to assert under certain circumstances. Task-number: QTBUG-23375 Change-Id: Ie5f043b50bb6b02a77be464ca18ea8e3bbb0f501 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml
new file mode 100644
index 0000000000..acd512a2be
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml
@@ -0,0 +1,24 @@
+import QtQuick 2.0
+
+Item {
+ id: root
+ property int first: 5
+ property bool test: false
+
+ Item {
+ id: exceptional
+ function exceptionalFunction() {
+ var obj = undefined;
+ var prop = undefined;
+ return obj[prop];
+ }
+ }
+
+ Component.onCompleted: {
+ root["firstChanged"].connect(exceptional.exceptionalFunction);
+ root["firstChanged"].connect(exceptional.exceptionalFunction);
+ root["firstChanged"].connect(exceptional.exceptionalFunction);
+ first = 6;
+ test = true;
+ }
+}