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

git-svn-id: svn://10.0.0.236/trunk@231857 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2007-08-10 21:30:13 +00:00
parent c4f450fd4d
commit 47aa30fa5c
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