From 328ad0c965997fc2854f91bd8161dca33e661f61 Mon Sep 17 00:00:00 2001 From: David Mandelin Date: Mon, 21 Sep 2009 11:01:09 -0700 Subject: [PATCH] Bug 514071: count external strings as malloc'd memory for JS GC scheduling, r=igor --HG-- extra : rebase_source : b2888a1705c49deabaf4aeac9be23c4ed06132d7 --- js/src/jsapi.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 28421013d04..d7b9a417dc2 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -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; }