зеркало из https://github.com/mozilla/pjs.git
Actually populate the string cache so we don't leak all deflated strings. bug 385378, r=brendan
This commit is contained in:
Родитель
964ff03daf
Коммит
b6c6ae0ddb
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче