From d1693c14b4e7f7d4a8ab4b2e876d9cf43a621e2e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 19 Jun 2018 16:12:22 +0200 Subject: revert change 353164263c55825a0ec72d30128c50560c626334 The change was too aggressive in trying to avoid marking the array data. We didn't catch all cases where on could be inserting a GC controlled object into the array data. Let's be safe and always mark the content of array data objects. Task-number: QTBUG-68894 Change-Id: Ifbb628be898c0903596b1a483212384295b01df5 Reviewed-by: Erik Verbruggen --- src/qml/jsruntime/qv4arraydata.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/qml/jsruntime/qv4arraydata.cpp') diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp index b33b34ee08..855407e6f7 100644 --- a/src/qml/jsruntime/qv4arraydata.cpp +++ b/src/qml/jsruntime/qv4arraydata.cpp @@ -168,8 +168,6 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt } newData->setAlloc(alloc); newData->setType(newType); - if (d) - newData->d()->needsMark = d->d()->needsMark; newData->setAttrs(enforceAttributes ? reinterpret_cast(newData->d()->values.values + alloc) : nullptr); o->setArrayData(newData); @@ -192,8 +190,6 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt memcpy(newData->d()->values.values, d->d()->values.values + offset, sizeof(Value)*toCopy); } - if (newType != Heap::ArrayData::Simple) - newData->d()->needsMark = true; if (newType != Heap::ArrayData::Sparse) return; -- cgit v1.2.3