зеркало из https://github.com/mozilla/gecko-dev.git
Bug 710922 - Don't call m_pools.all() if m_pools isn't initialized. r=luke.
--HG-- extra : rebase_source : 72da22ce0e29d449da9ffa211b4b892ab7796303
This commit is contained in:
Родитель
8b2e2abfcc
Коммит
6e8a984e8b
|
@ -45,11 +45,14 @@ ExecutableAllocator::sizeOfCode(size_t *method, size_t *regexp, size_t *unused)
|
||||||
*method = 0;
|
*method = 0;
|
||||||
*regexp = 0;
|
*regexp = 0;
|
||||||
*unused = 0;
|
*unused = 0;
|
||||||
for (ExecPoolHashSet::Range r = m_pools.all(); !r.empty(); r.popFront()) {
|
|
||||||
ExecutablePool* pool = r.front();
|
if (m_pools.initialized()) {
|
||||||
*method += pool->m_mjitCodeMethod;
|
for (ExecPoolHashSet::Range r = m_pools.all(); !r.empty(); r.popFront()) {
|
||||||
*regexp += pool->m_mjitCodeRegexp;
|
ExecutablePool* pool = r.front();
|
||||||
*unused += pool->m_allocation.size - pool->m_mjitCodeMethod - pool->m_mjitCodeRegexp;
|
*method += pool->m_mjitCodeMethod;
|
||||||
|
*regexp += pool->m_mjitCodeRegexp;
|
||||||
|
*unused += pool->m_allocation.size - pool->m_mjitCodeMethod - pool->m_mjitCodeRegexp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,6 +241,7 @@ public:
|
||||||
if (destroyCallback)
|
if (destroyCallback)
|
||||||
destroyCallback(pool->m_allocation.pages, pool->m_allocation.size);
|
destroyCallback(pool->m_allocation.pages, pool->m_allocation.size);
|
||||||
systemRelease(pool->m_allocation);
|
systemRelease(pool->m_allocation);
|
||||||
|
JS_ASSERT(m_pools.initialized());
|
||||||
m_pools.remove(m_pools.lookup(pool)); // this asserts if |pool| is not in m_pools
|
m_pools.remove(m_pools.lookup(pool)); // this asserts if |pool| is not in m_pools
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче