mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 408720, Trying to reduce MH regression caused by the content arena, part 1 r+sr=sicking
This commit is contained in:
parent
e00cf25458
commit
b6b8ee7724
@ -112,9 +112,6 @@ nsDOMNodeAllocator::Init()
|
||||
#ifdef DEBUG
|
||||
++gDOMNodeAllocators;
|
||||
#endif
|
||||
mPool = new PLArenaPool();
|
||||
NS_ENSURE_TRUE(mPool, NS_ERROR_OUT_OF_MEMORY);
|
||||
PL_InitArenaPool(mPool, "nsDOMNodeAllocator", 4096 * (sizeof(void*)/2), 0);
|
||||
memset(mRecyclers, 0, sizeof(mRecyclers));
|
||||
return NS_OK;
|
||||
}
|
||||
@ -150,6 +147,12 @@ nsDOMNodeAllocator::Alloc(size_t aSize)
|
||||
mRecyclers[index] = next;
|
||||
}
|
||||
if (!result) {
|
||||
if (!mPool) {
|
||||
mPool = new PLArenaPool();
|
||||
NS_ENSURE_TRUE(mPool, nsnull);
|
||||
PL_InitArenaPool(mPool, "nsDOMNodeAllocator",
|
||||
4096 * (sizeof(void*)/2), 0);
|
||||
}
|
||||
// Allocate a new chunk from the arena
|
||||
PL_ARENA_ALLOCATE(result, mPool, aSize);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user