Back out b80f97b00d2f (bug 979480), it's in the way of more immediately important work. r=backout

This commit is contained in:
Jeff Walden
2014-03-14 16:07:43 -07:00
parent 480a432653
commit c4218d28ae
25 changed files with 1096 additions and 551 deletions

View File

@@ -5900,7 +5900,19 @@ JSObject::addSizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf, JS::Objects
if (hasDynamicElements()) {
js::ObjectElements *elements = getElementsHeader();
sizes->mallocHeapElementsNonAsmJS += mallocSizeOf(elements);
if (MOZ_UNLIKELY(elements->isAsmJSArrayBuffer())) {
#if defined (JS_CPU_X64)
// On x64, ArrayBufferObject::prepareForAsmJS switches the
// ArrayBufferObject to use mmap'd storage.
sizes->nonHeapElementsAsmJS += as<ArrayBufferObject>().byteLength();
#else
sizes->mallocHeapElementsAsmJS += mallocSizeOf(elements);
#endif
} else if (MOZ_UNLIKELY(elements->isMappedArrayBuffer())) {
sizes->nonHeapElementsMapped += as<ArrayBufferObject>().byteLength();
} else {
sizes->mallocHeapElementsNonAsmJS += mallocSizeOf(elements);
}
}
// Other things may be measured in the future if DMD indicates it is worthwhile.
@@ -5927,8 +5939,6 @@ JSObject::addSizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf, JS::Objects
sizes->mallocHeapRegExpStatics += as<RegExpStaticsObject>().sizeOfData(mallocSizeOf);
} else if (is<PropertyIteratorObject>()) {
sizes->mallocHeapPropertyIteratorData += as<PropertyIteratorObject>().sizeOfMisc(mallocSizeOf);
} else if (is<ArrayBufferObject>() || is<SharedArrayBufferObject>()) {
ArrayBufferObject::addSizeOfExcludingThis(this, mallocSizeOf, sizes);
#ifdef JS_ION
} else if (is<AsmJSModuleObject>()) {
as<AsmJSModuleObject>().addSizeOfMisc(mallocSizeOf, &sizes->nonHeapCodeAsmJS,