Bug 718053 - Fix Valgrind warnings (r=cdleary)

This commit is contained in:
Bill McCloskey 2012-02-21 09:49:22 -08:00
parent 55ab7acf75
commit ee28f5036b
2 changed files with 5 additions and 2 deletions

View File

@ -793,7 +793,8 @@ JSRuntime::JSRuntime()
#ifdef DEBUG
noGCOrAllocationCheck(0),
#endif
inOOMReport(0)
inOOMReport(0),
jitHardening(false)
{
/* Initialize infallibly first, so we can goto bad and JS_DestroyRuntime. */
JS_INIT_CLIST(&contextList);

View File

@ -1146,9 +1146,11 @@ js_NewPrinter(JSContext *cx, const char *name, JSFunction *fun,
void
js_DestroyPrinter(JSPrinter *jp)
{
JSContext *cx = jp->sprinter.context;
jp->pool.freeAll();
Foreground::delete_(jp->localNames);
jp->sprinter.context->free_(jp);
jp->sprinter.Sprinter::~Sprinter();
cx->free_(jp);
}
JSString *