Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Kent Hansen
authored and
Qt by Nokia
committed
Nov 16, 2011
1 parent
ddf9883
commit 92660b1
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22679.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters