mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
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:
parent
110f79280d
commit
51c380ef8b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user