diff options
author | Glenn Watson <glenn.watson@nokia.com> | 2012-07-18 13:20:00 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-08 00:34:22 +0200 |
commit | ec519529087cc3005d55242569dcbca3dcee91bf (patch) | |
tree | 9fb83a2396c62e5231b11aaff013e94ed7f239dc /tests/auto/qml/debugger/qqmldebugjs | |
parent | 8bb5677f45935a03f1ed439e8a01ca71e9f1152c (diff) |
Support JS Array.sort() function for sequence wrappers.
The V8 natve sort implementation calls some functions that are
incompatible with the way sequence wrappers work. In particular,
it calls an internal length() function which does not pass through
the length accessor provided by sequence wrappers, so the sort
function always thinks the array is zero length. Instead, clone the
array prototype and override the sort function with one that is
specific to sequence wrappers.
Task-number: QTBUG-25269
Change-Id: Ic83b9ee0bd3a0707e512f28057f0f99b432fded4
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'tests/auto/qml/debugger/qqmldebugjs')
-rw-r--r-- | tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp index 5f74f865ec..803c2d8720 100644 --- a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp +++ b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp @@ -1772,7 +1772,7 @@ void tst_QQmlDebugJS::getScripts() QList<QVariant> scripts = value.value("body").toList(); - QCOMPARE(scripts.count(), 2); + QCOMPARE(scripts.count(), 3); } void tst_QQmlDebugJS::getSource() |