Bug 1268863 - Follow-up to appease rooting hazard analysis (rs=sfink)
authorLuke Wagner <luke@mozilla.com>
Mon, 02 May 2016 18:12:00 -0500
changeset 295762 5d2a22f7aa3963f33c0f551f48e26cee99e0fa93
parent 295761 5f92a21902622c9afedaa23f7939e6d710410d38
child 295763 623941e6df489758f9b75317544bb122d260f2ce
push id76069
push userlwagner@mozilla.com
push dateMon, 02 May 2016 23:12:32 +0000
treeherdermozilla-inbound@5d2a22f7aa39 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1268863
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1268863 - Follow-up to appease rooting hazard analysis (rs=sfink) MozReview-Commit-ID: 8GBEgy3wMMq
js/src/vm/MemoryMetrics.cpp
--- a/js/src/vm/MemoryMetrics.cpp
+++ b/js/src/vm/MemoryMetrics.cpp
@@ -449,30 +449,30 @@ StatsCellCallback(JSRuntime* rt, void* d
         JSObject* obj = static_cast<JSObject*>(thing);
         CompartmentStats& cStats = obj->compartment()->compartmentStats();
         JS::ClassInfo info;        // This zeroes all the sizes.
         info.objectsGCHeap += thingSize;
         obj->addSizeOfExcludingThis(rtStats->mallocSizeOf_, &info);
 
         cStats.classInfo.add(info);
 
+        if (obj->is<WasmModuleObject>()) {
+            if (ScriptSource* ss = obj->as<WasmModuleObject>().module().maybeScriptSource())
+                CollectScriptSourceStats<granularity>(closure, ss);
+        }
+
         const Class* clasp = obj->getClass();
         const char* className = clasp->name;
         AddClassInfo(granularity, cStats, className, info);
 
         if (ObjectPrivateVisitor* opv = closure->opv) {
             nsISupports* iface;
             if (opv->getISupports_(obj, &iface) && iface)
                 cStats.objectsPrivate += opv->sizeOfIncludingThis(iface);
         }
-
-        if (obj->is<WasmModuleObject>()) {
-            if (ScriptSource* ss = obj->as<WasmModuleObject>().module().maybeScriptSource())
-                CollectScriptSourceStats<granularity>(closure, ss);
-        }
         break;
       }
 
       case JS::TraceKind::Script: {
         JSScript* script = static_cast<JSScript*>(thing);
         CompartmentStats& cStats = script->compartment()->compartmentStats();
         cStats.scriptsGCHeap += thingSize;
         cStats.scriptsMallocHeapData += script->sizeOfData(rtStats->mallocSizeOf_);