Bug 1407505 - Relax assertion in ExecutableAllocator destructor if the embedding leaked r=jandem
authorJon Coppeard <jcoppeard@mozilla.com>
Thu, 12 Oct 2017 13:34:56 +0100
changeset 385853 3d373c760a7f85a926815957b06c0156ee1b4d2e
parent 385852 fc50cd79955f135892094818d4fb8d3f85f93eb9
child 385854 b0b797668d26652795ec80d72b72699e3f8dc51e
push id32669
push userarchaeopteryx@coole-files.de
push dateThu, 12 Oct 2017 21:58:56 +0000
treeherdermozilla-central@25aad10380b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1407505
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1407505 - Relax assertion in ExecutableAllocator destructor if the embedding leaked r=jandem
js/src/jit/ExecutableAllocator.cpp
--- a/js/src/jit/ExecutableAllocator.cpp
+++ b/js/src/jit/ExecutableAllocator.cpp
@@ -123,17 +123,18 @@ ExecutableAllocator::ExecutableAllocator
 }
 
 ExecutableAllocator::~ExecutableAllocator()
 {
     for (size_t i = 0; i < m_smallPools.length(); i++)
         m_smallPools[i]->release(/* willDestroy = */true);
 
     // If this asserts we have a pool leak.
-    MOZ_ASSERT_IF(m_pools.initialized(), m_pools.empty());
+    MOZ_ASSERT_IF(m_pools.initialized() && rt_->gc.shutdownCollectedEverything(),
+                  m_pools.empty());
 }
 
 ExecutablePool*
 ExecutableAllocator::poolForSize(size_t n)
 {
     // Try to fit in an existing small allocator.  Use the pool with the
     // least available space that is big enough (best-fit).  This is the
     // best strategy because (a) it maximizes the chance of the next