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-11 18:55:53 -04:00
parent d90a8e1023
commit 2b6b69da90

View File

@ -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