Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit aa5c7c4

Browse files
committed
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
1 parent 297ac5b commit aa5c7c4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

js/src/vm/ArrayObject-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ inline void ArrayObject::setLength(JSContext* cx, uint32_t length) {
4242
MOZ_ASSERT_IF(clasp->hasFinalize(), heap == gc::TenuredHeap);
4343
MOZ_ASSERT_IF(group->hasUnanalyzedPreliminaryObjects(),
4444
heap == js::gc::TenuredHeap);
45+
MOZ_ASSERT_IF(group->shouldPreTenureDontCheckGeneration(),
46+
heap == gc::TenuredHeap);
4547

4648
// Arrays can use their fixed slots to store elements, so can't have shapes
4749
// which allow named properties to be stored in the fixed slots.

js/src/vm/JSObject.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4284,6 +4284,8 @@ void JSObject::debugCheckNewObject(ObjectGroup* group, Shape* shape,
42844284
clasp->isProxy());
42854285
MOZ_ASSERT_IF(group->hasUnanalyzedPreliminaryObjects(),
42864286
heap == gc::TenuredHeap);
4287+
MOZ_ASSERT_IF(group->shouldPreTenureDontCheckGeneration(),
4288+
heap == gc::TenuredHeap);
42874289

42884290
MOZ_ASSERT(!group->realm()->hasObjectPendingMetadata());
42894291

0 commit comments

Comments
 (0)