mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 720219 (part 2) - Clean up JS string measurement. r=bhackett.
--HG-- extra : rebase_source : bc43388760741370265654aa4661ee422d6b6a33
This commit is contained in:
parent
ed9d554a9b
commit
197bda7312
@ -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. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user