mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 18:51:28 +00:00
Bug 518427 - TM: fix valgrind error in jsregexp.cpp, r=dmandelin.
This commit is contained in:
parent
01fc78dda8
commit
e339de6362
@ -3083,12 +3083,12 @@ class RegExpNativeCompiler {
|
||||
|
||||
Allocator &alloc = *JS_TRACE_MONITOR(cx).dataAlloc;
|
||||
|
||||
GuardRecord* guard = (GuardRecord *)
|
||||
alloc.alloc(sizeof(GuardRecord) +
|
||||
sizeof(SideExit) +
|
||||
(re_length-1) * sizeof(jschar));
|
||||
memset(guard, 0, sizeof(*guard));
|
||||
SideExit* exit = (SideExit*)(guard+1);
|
||||
size_t len = (sizeof(GuardRecord) +
|
||||
sizeof(VMSideExit) +
|
||||
(re_length-1) * sizeof(jschar));
|
||||
GuardRecord* guard = (GuardRecord *) alloc.alloc(len);
|
||||
memset(guard, 0, len);
|
||||
VMSideExit* exit = (VMSideExit*)(guard+1);
|
||||
guard->exit = exit;
|
||||
guard->exit->target = fragment;
|
||||
fragment->lastIns = lir->insGuard(LIR_x, NULL, guard);
|
||||
|
Loading…
Reference in New Issue
Block a user