Bug 514071: count external strings as malloc'd memory for JS GC scheduling, r=igor

--HG--
extra : rebase_source : b2888a1705c49deabaf4aeac9be23c4ed06132d7
This commit is contained in:
David Mandelin 2009-09-21 11:01:09 -07:00
parent 1e96fce476
commit 328ad0c965

View File

@ -2622,6 +2622,7 @@ JS_NewExternalString(JSContext *cx, jschar *chars, size_t length, intN type)
if (!str)
return NULL;
str->initFlat(chars, length);
cx->updateMallocCounter(length * sizeof(jschar));
return str;
}