Bug 885908 - use js_malloc instead cx->malloc inside ScriptSource::chars to avoid triggering GCs for large scripts (r=billm)

--HG--
extra : rebase_source : 87e4669be579cb7b9f836856e1bfb4bfcd0e6669
This commit is contained in:
Luke Wagner 2013-07-01 16:26:19 -07:00
Родитель 927915b3cb
Коммит 9c55104e5e
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1249,7 +1249,7 @@ ScriptSource::chars(JSContext *cx)
JSStableString *cached = cx->runtime()->sourceDataCache.lookup(this);
if (!cached) {
const size_t nbytes = sizeof(jschar) * (length_ + 1);
jschar *decompressed = static_cast<jschar *>(cx->malloc_(nbytes));
jschar *decompressed = static_cast<jschar *>(js_malloc(nbytes));
if (!decompressed)
return NULL;
if (!DecompressString(data.compressed, compressedLength_,