mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Actually populate the string cache so we don't leak all deflated strings. bug 385378, r=brendan
This commit is contained in:
parent
a957bfec45
commit
e50f715fac
@ -3194,7 +3194,8 @@ js_GetStringBytes(JSContext *cx, JSString *str)
|
||||
rt = js_GetGCStringRuntime(str);
|
||||
}
|
||||
|
||||
if (!rt->deflatedStringCache) {
|
||||
#ifdef JS_THREADSAFE
|
||||
if (!rt->deflatedStringCacheLock) {
|
||||
/*
|
||||
* Called from last GC (see js_DestroyContext), after runtime string
|
||||
* state has been finalized. We have no choice but to leak here.
|
||||
@ -3202,6 +3203,7 @@ js_GetStringBytes(JSContext *cx, JSString *str)
|
||||
return js_DeflateString(NULL, JSSTRING_CHARS(str),
|
||||
JSSTRING_LENGTH(str));
|
||||
}
|
||||
#endif
|
||||
|
||||
JS_ACQUIRE_LOCK(rt->deflatedStringCacheLock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user