Fix crash in qqmlecmascript::sequenceSort with MSVC in debug builds
authorSimon Hausmann <simon.hausmann@digia.com>
Wed, 26 Jun 2013 10:44:56 +0000 (12:44 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 26 Jun 2013 13:45:59 +0000 (15:45 +0200)
commit62f6c0dc849b80d22201a456ac30b0a9b613c285
tree7b014c6d8145277c1dc0932a6b67a8330581eeb4
parent500f3c2848152aeb6aae320adfb32dd0b374e22b
Fix crash in qqmlecmascript::sequenceSort with MSVC in debug builds

ArrayPrototype.sort allows specifying a compare function implemented in JS,
which we "wrap" and then pass on to std::sort. std::sort with MSVC has
an assertion verifying that the less-than compare function provided is
perfectly consistent in its return values. We don't want JS to easily crash
the entire application and therefore resort to qSort().

Change-Id: Id2c758a7d2bee60f31a7a3971172bca9b3c69af6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/v4/qv4object.cpp