Skip to content

Commit da525a1

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 UltraBlame original commit: 82a1c708780619b605a5c0f63cd8046f3e992692
1 parent 4ef4f32 commit da525a1

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

4749

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)