Bug 798510 - Part 2: Fix bug in JSRuntime::sizeOfExplicitNonHeap() where, if execAlloc_ is null, we don't measure the stack space. rs=njn

This commit is contained in:
Justin Lebar 2012-10-12 10:26:06 -04:00
Родитель a82900f6ee
Коммит 2721f60472
1 изменённых файлов: 8 добавлений и 5 удалений

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

@ -139,12 +139,15 @@ JSRuntime::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf, RuntimeSizes *rtS
size_t
JSRuntime::sizeOfExplicitNonHeap()
{
if (!execAlloc_)
return 0;
size_t size = stackSpace.sizeOf();
size_t jaegerCode, ionCode, regexpCode, unusedCode;
execAlloc_->sizeOfCode(&jaegerCode, &ionCode, &regexpCode, &unusedCode);
return jaegerCode + ionCode + regexpCode + unusedCode + stackSpace.sizeOf();
if (execAlloc_) {
size_t jaegerCode, ionCode, regexpCode, unusedCode;
execAlloc_->sizeOfCode(&jaegerCode, &ionCode, &regexpCode, &unusedCode);
size += jaegerCode + ionCode + regexpCode + unusedCode;
}
return size;
}
void