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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user