These asserts now work after 903519 - Allocate strings in the nursery if enabled, leaving only one major assert left in jsgc.cpp.

These asserts now work after 903519 - Allocate strings in the nursery if enabled.
This commit is contained in:
win7-7 2026-01-16 11:54:34 +02:00 committed by wuggy
commit a70d07a7bb
2 changed files with 3 additions and 3 deletions

View file

@ -261,14 +261,14 @@ Cell::needWriteBarrierPre(JS::Zone* zone) {
/* static */ MOZ_ALWAYS_INLINE TenuredCell*
TenuredCell::fromPointer(void* ptr)
{
//MOZ_ASSERT(static_cast<TenuredCell*>(ptr)->isTenured());
MOZ_ASSERT(static_cast<TenuredCell*>(ptr)->isTenured());
return static_cast<TenuredCell*>(ptr);
}
/* static */ MOZ_ALWAYS_INLINE const TenuredCell*
TenuredCell::fromPointer(const void* ptr)
{
//MOZ_ASSERT(static_cast<const TenuredCell*>(ptr)->isTenured());
MOZ_ASSERT(static_cast<const TenuredCell*>(ptr)->isTenured());
return static_cast<const TenuredCell*>(ptr);
}

View file

@ -1001,7 +1001,7 @@ bool
js::GCMarker::mark(T* thing)
{
AssertShouldMarkInZone(thing);
//MOZ_ASSERT(!IsInsideNursery(TenuredCell::fromPointer(thing)));
MOZ_ASSERT(!IsInsideNursery(TenuredCell::fromPointer(thing)));
return ParticipatesInCC<T>::value
? TenuredCell::fromPointer(thing)->markIfUnmarked(markColor())
: TenuredCell::fromPointer(thing)->markIfUnmarked(MarkColor::Black);