Bug 1280591 - Check if gray roots are valid when we add them. r=terrence

This commit is contained in:
Andrew McCreight 2016-07-20 10:41:24 -07:00
parent 84787f181a
commit d294fad895

View File

@ -414,6 +414,9 @@ void
BufferGrayRootsTracer::onChild(const JS::GCCellPtr& thing)
{
MOZ_ASSERT(runtime()->isHeapBusy());
MOZ_RELEASE_ASSERT(thing);
// Check if |thing| is corrupt by calling a method that touches the heap.
MOZ_RELEASE_ASSERT(thing.asCell()->getTraceKind() <= JS::TraceKind::Null);
if (bufferingGrayRootsFailed)
return;