Bug 1241233 - Odin: don't report symbolicLinks memory usage twice (r=bbouvier)
authorLuke Wagner <luke@mozilla.com>
Thu, 18 Feb 2016 10:33:57 -0600
changeset 331911 ded9e2d81845f5b62dfb8035df307d7dc05c14f2
parent 331910 92827e1743bccc47d56a4dd312e5035f598262b8
child 331912 1c20a8b69e1251a772819b96288e0f8d0ab3d773
push id11113
push userrjesup@wgate.com
push dateThu, 18 Feb 2016 19:00:12 +0000
reviewersbbouvier
bugs1241233
milestone47.0a1
Bug 1241233 - Odin: don't report symbolicLinks memory usage twice (r=bbouvier) MozReview-Commit-ID: EH7pybiedfB
js/src/asmjs/WasmModule.cpp
--- a/js/src/asmjs/WasmModule.cpp
+++ b/js/src/asmjs/WasmModule.cpp
@@ -226,24 +226,19 @@ StaticLinkData::clone(JSContext* cx, Sta
     return ClonePodVector(cx, internalLinks, &out->internalLinks) &&
            symbolicLinks.clone(cx, &out->symbolicLinks) &&
            CloneVector(cx, funcPtrTables, &out->funcPtrTables);
 }
 
 size_t
 StaticLinkData::sizeOfExcludingThis(MallocSizeOf mallocSizeOf) const
 {
-    size_t size = internalLinks.sizeOfExcludingThis(mallocSizeOf) +
-                  symbolicLinks.sizeOfExcludingThis(mallocSizeOf) +
-                  SizeOfVectorExcludingThis(funcPtrTables, mallocSizeOf);
-
-    for (const Uint32Vector& offsets : symbolicLinks)
-        size += offsets.sizeOfExcludingThis(mallocSizeOf);
-
-    return size;
+    return internalLinks.sizeOfExcludingThis(mallocSizeOf) +
+           symbolicLinks.sizeOfExcludingThis(mallocSizeOf) +
+           SizeOfVectorExcludingThis(funcPtrTables, mallocSizeOf);
 }
 
 static size_t
 SerializedSigSize(const Sig& sig)
 {
     return sizeof(ExprType) +
            SerializedPodVectorSize(sig.args());
 }