Fix interaction between head room and appending in arrays
authorLars Knoll <lars.knoll@digia.com>
Mon, 18 Nov 2013 12:54:33 +0000 (13:54 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 18 Nov 2013 14:53:57 +0000 (15:53 +0100)
commit95d35ab188665281f54095e52948c9aad08e364d
treeeb84cad23b662dcaf809a993cf5e3f7e9c54e476
parent3d145175fd50b3fe31c62348307c995717d4200d
Fix interaction between head room and appending in arrays

We reserve space on both ends of the JS array for appending
and prepending. Make sure they interact well with each other
and don't cause any memory corruption.

Task-number: QTBUG-34853
Change-Id: I184280178690e3cb12ab9b199a8436b32383af38
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jsruntime/qv4arrayobject.cpp
src/qml/jsruntime/qv4object.cpp
src/qml/jsruntime/qv4object_p.h
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp