summaryrefslogtreecommitdiff
path: root/www/seamonkey/patches/patch-mozilla_js_src_yarr_YarrInterpreter.cpp
blob: 47e25ce8ccdca8e62785b8fef4c8282497e20c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
$NetBSD: patch-mozilla_js_src_yarr_YarrInterpreter.cpp,v 1.1 2013/07/12 12:24:10 ryoon Exp $

--- mozilla/js/src/yarr/YarrInterpreter.cpp.orig	2013-06-20 04:35:09.000000000 +0000
+++ mozilla/js/src/yarr/YarrInterpreter.cpp
@@ -156,6 +156,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();