diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2011-11-11 09:39:15 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-16 13:04:50 +0100 |
commit | 92660b13bb138d219f49ea203fa5e5aed9de74cb (patch) | |
tree | f3a0264cdbeacb7c23719a2a74b0ffa09fffa59b /tests/auto/declarative/qdeclarativeecmascript/data | |
parent | ddf9883f8d00dcdfd908b38c60114a06ce8af185 (diff) |
Add autotest for qml/v8 optimization bug
After a function that accesses a qml context property was
inlined, calls to global functions would fail with
"TypeError: Illegal invocation".
Fixed in qtbase's v8.
Task-number: QTBUG-22679
Change-Id: Id6e2604e5151585febfe1b667869dc3b1fad6e5e
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22679.qml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22679.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22679.qml new file mode 100644 index 0000000000..b38a84b4c0 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22679.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +QtObject { + function accessContextProperty() { + for (var i = 0; i < contextProp.stringProperty.length; ++i) ; + } + + Component.onCompleted: { + for (var i = 0; i < 1000; ++i) + accessContextProperty(); + // Shouldn't cause "Illegal invocation" error. + gc(); + } +} |