From 0cf06f25b5aa94de72f6c06ebd1236b1f55d4ded Mon Sep 17 00:00:00 2001 From: Eric Rahm Date: Sat, 7 Jun 2014 18:35:18 -0700 Subject: [PATCH] Bug 1022004 - Support loading memory reports that already have heap-unclassified defined. r=njn --- toolkit/components/aboutmemory/content/aboutMemory.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toolkit/components/aboutmemory/content/aboutMemory.js b/toolkit/components/aboutmemory/content/aboutMemory.js index dba288f1b60d..c8e05b80fbdc 100644 --- a/toolkit/components/aboutmemory/content/aboutMemory.js +++ b/toolkit/components/aboutmemory/content/aboutMemory.js @@ -1233,6 +1233,12 @@ function addHeapUnclassifiedNode(aT, aHeapAllocatedNode, aHeapTotal) if (aHeapAllocatedNode === undefined) return false; + if (aT.findKid("heap-unclassified")) { + // heap-unclassified was already calculated, there's nothing left to do. + // This can happen when memory reports are exported from areweslimyet.com. + return true; + } + assert(aHeapAllocatedNode._isDegenerate, "heap-allocated is not degenerate"); let heapAllocatedBytes = aHeapAllocatedNode._amount; let heapUnclassifiedT = new TreeNode("heap-unclassified", UNITS_BYTES);