Bug 720219 (part 2) - Clean up JS string measurement. r=bhackett.

--HG--
extra : rebase_source : bc43388760741370265654aa4661ee422d6b6a33
This commit is contained in:
Nicholas Nethercote 2012-01-23 15:38:59 -08:00
Родитель ed9d554a9b
Коммит 197bda7312
3 изменённых файлов: 3 добавлений и 3 удалений

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

@ -140,7 +140,7 @@ CellCallback(JSContext *cx, void *vdata, void *thing, JSGCTraceKind traceKind,
{
JSString *str = static_cast<JSString *>(thing);
curr->gcHeapStrings += thingSize;
curr->stringChars += str->charsHeapSize(data->mallocSizeOf);
curr->stringChars += str->sizeOfExcludingThis(data->mallocSizeOf);
break;
}
case JSTRACE_SHAPE:

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

@ -79,7 +79,7 @@ JSString::isExternal() const
}
size_t
JSString::charsHeapSize(JSMallocSizeOfFun mallocSizeOf)
JSString::sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf)
{
/* JSRope: do nothing, we'll count all children chars when we hit the leaf strings. */
if (isRope())

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

@ -407,7 +407,7 @@ class JSString : public js::gc::Cell
/* Gets the number of bytes that the chars take on the heap. */
JS_FRIEND_API(size_t) charsHeapSize(JSMallocSizeOfFun mallocSizeOf);
size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf);
/* Offsets for direct field from jit code. */