зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1166041 - Wait for nursery sweeping to finish before shutting down; r=jonco
--HG-- extra : rebase_source : 69979426eea5b35354b22dc744e794ed33438398
This commit is contained in:
Родитель
3940b5fcb7
Коммит
444e5712a9
|
@ -638,6 +638,7 @@ js::Nursery::freeMallocedBuffers()
|
|||
void
|
||||
js::Nursery::waitBackgroundFreeEnd()
|
||||
{
|
||||
MOZ_ASSERT(freeMallocedBuffersTask);
|
||||
freeMallocedBuffersTask->join();
|
||||
}
|
||||
|
||||
|
|
|
@ -1318,6 +1318,10 @@ GCRuntime::init(uint32_t maxbytes, uint32_t maxNurseryBytes)
|
|||
void
|
||||
GCRuntime::finish()
|
||||
{
|
||||
/* Wait for the nursery sweeping to end. */
|
||||
if (rt->gc.nursery.isEnabled())
|
||||
rt->gc.nursery.waitBackgroundFreeEnd();
|
||||
|
||||
/*
|
||||
* Wait until the background finalization and allocation stops and the
|
||||
* helper thread shuts down before we forcefully release any remaining GC
|
||||
|
|
Загрузка…
Ссылка в новой задаче