Bug 1532376 - Assert that the group's shouldPretenure flag is respected when creating an object r=jandem

Differential Revision: https://phabricator.services.mozilla.com/D22326
This commit is contained in:
Jon Coppeard 2019-03-06 16:38:29 +00:00
Родитель 297ac5be9c
Коммит aa5c7c415a
2 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -42,6 +42,8 @@ inline void ArrayObject::setLength(JSContext* cx, uint32_t length) {
MOZ_ASSERT_IF(clasp->hasFinalize(), heap == gc::TenuredHeap); MOZ_ASSERT_IF(clasp->hasFinalize(), heap == gc::TenuredHeap);
MOZ_ASSERT_IF(group->hasUnanalyzedPreliminaryObjects(), MOZ_ASSERT_IF(group->hasUnanalyzedPreliminaryObjects(),
heap == js::gc::TenuredHeap); heap == js::gc::TenuredHeap);
MOZ_ASSERT_IF(group->shouldPreTenureDontCheckGeneration(),
heap == gc::TenuredHeap);
// Arrays can use their fixed slots to store elements, so can't have shapes // Arrays can use their fixed slots to store elements, so can't have shapes
// which allow named properties to be stored in the fixed slots. // which allow named properties to be stored in the fixed slots.

Просмотреть файл

@ -4284,6 +4284,8 @@ void JSObject::debugCheckNewObject(ObjectGroup* group, Shape* shape,
clasp->isProxy()); clasp->isProxy());
MOZ_ASSERT_IF(group->hasUnanalyzedPreliminaryObjects(), MOZ_ASSERT_IF(group->hasUnanalyzedPreliminaryObjects(),
heap == gc::TenuredHeap); heap == gc::TenuredHeap);
MOZ_ASSERT_IF(group->shouldPreTenureDontCheckGeneration(),
heap == gc::TenuredHeap);
MOZ_ASSERT(!group->realm()->hasObjectPendingMetadata()); MOZ_ASSERT(!group->realm()->hasObjectPendingMetadata());