From bug 702300 comment 61: > @@ +3773,5 @@ > > + rt->gcHelperThread.waitBackgroundSweepEnd(); > > +#endif > > + AutoUnlockGC unlock(rt); > > + > > + AutoCopyFreeListToArenas copy(rt); > > Waiting for background sweeping to end and the AutoUnlockGC should be > unnecessary. Same for AutoCopyFreeListToArenas. The functions that can be simplified are JS_IterateCompartments, IterateCompartmentsArenasCells, and IterateChunks.
It's only JS_IterateCompartments that needs to be changed. The others touch things that are modified by background sweeping (cells and chunks), so they should still wait for it to end. (Although we probably don't need the AutoCopyFreeListToArenas in IterateChunks, but it really doesn't cost us much.) This is my fault. I should have caught it in review when JS_IterateCompartments landed.
Created attachment 598757 [details] [diff] [review] patch