Finish the deflated string cache after uninterning atoms, so we don't leak their associated strings. b=391587 r+a=brendan

This commit is contained in:
dbaron@dbaron.org 2007-08-10 14:30:13 -07:00
parent 110f79280d
commit 51c380ef8b
2 changed files with 6 additions and 6 deletions

View File

@ -767,6 +767,12 @@ JS_DestroyRuntime(JSRuntime *rt)
js_FreeRuntimeScriptState(rt);
js_FinishAtomState(rt);
/*
* Finish the deflated string cache after the last GC and after
* calling js_FinishAtomState, which finalizes strings.
*/
js_FinishDeflatedStringCache(rt);
js_FinishGC(rt);
#ifdef JS_THREADSAFE
if (rt->gcLock)

View File

@ -409,12 +409,6 @@ js_DestroyContext(JSContext *cx, JSDestroyContextMode mode)
if (rt->scriptFilenameTable && rt->scriptFilenameTable->nentries == 0)
js_FinishRuntimeScriptState(rt);
/*
* Free the deflated string cache, but only after the last GC has
* collected all unleaked strings.
*/
js_FinishDeflatedStringCache(rt);
/*
* Free unit string storage only after the last GC has completed, so
* that js_FinalizeStringRT can detect unit strings and avoid calling