mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
Bug 871444 - Round allocation size to keep required alignment. r=sstangl
This commit is contained in:
parent
783d0a1c40
commit
bfaf87506a
@ -158,6 +158,7 @@ public:
|
||||
ParenthesesDisjunctionContext* allocParenthesesDisjunctionContext(ByteDisjunction* disjunction, unsigned* output, ByteTerm& term)
|
||||
{
|
||||
size_t size = sizeof(ParenthesesDisjunctionContext) - sizeof(unsigned) + (term.atom.parenthesesDisjunction->m_numSubpatterns << 1) * sizeof(unsigned) + sizeof(DisjunctionContext) - sizeof(uintptr_t) + disjunction->m_frameSize * sizeof(uintptr_t);
|
||||
size = JS_ROUNDUP(size, JS_ALIGNMENT_OF(ParenthesesDisjunctionContext));
|
||||
allocatorPool = allocatorPool->ensureCapacity(size);
|
||||
if (!allocatorPool)
|
||||
CRASH();
|
||||
|
Loading…
Reference in New Issue
Block a user