Bug 1356752 - Fix --enable-tasktracer build by adding the missing aWriter argument. r?njn draft
authorMarkus Stange <mstange@themasta.com>
Sat, 15 Apr 2017 00:22:07 -0400
changeset 563174 06589ba25f99cff2ba36e6a9cbaf0946b349c4e7
parent 563173 3303122705233a99269a52f8ee15648bd0f26e46
child 563175 2db91197138fafcab1bcb3094fe367145a143e2d
push id54218
push userbmo:mstange@themasta.com
push dateSat, 15 Apr 2017 04:22:40 +0000
reviewersnjn
bugs1356752
milestone55.0a1
Bug 1356752 - Fix --enable-tasktracer build by adding the missing aWriter argument. r?njn MozReview-Commit-ID: L87KE3BmYRB
tools/profiler/core/platform.cpp
--- a/tools/profiler/core/platform.cpp
+++ b/tools/profiler/core/platform.cpp
@@ -1135,17 +1135,17 @@ AppendSharedLibraries(JSONWriter& aWrite
   info.SortByAddress();
   for (size_t i = 0; i < info.GetSize(); i++) {
     AddSharedLibraryInfoToStream(aWriter, info.GetEntry(i));
   }
 }
 
 #ifdef MOZ_TASK_TRACER
 static void
-StreamNameAndThreadId(const char* aName, int aThreadId)
+StreamNameAndThreadId(JSONWriter& aWriter, const char* aName, int aThreadId)
 {
   aWriter.StartObjectElement();
   {
     if (XRE_GetProcessType() == GeckoProcessType_Plugin) {
       // TODO Add the proper plugin name
       aWriter.StringProperty("name", "Plugin");
     } else {
       aWriter.StringProperty("name", aName);
@@ -1170,23 +1170,23 @@ StreamTaskTracer(PS::LockRef aLock, Spli
   }
   aWriter.EndArray();
 
   aWriter.StartArrayProperty("threads");
   {
     const PS::ThreadVector& liveThreads = gPS->LiveThreads(aLock);
     for (size_t i = 0; i < liveThreads.size(); i++) {
       ThreadInfo* info = liveThreads.at(i);
-      StreamNameAndThreadId(info->Name(), info->ThreadId());
+      StreamNameAndThreadId(aWriter, info->Name(), info->ThreadId());
     }
 
     const PS::ThreadVector& deadThreads = gPS->DeadThreads(aLock);
     for (size_t i = 0; i < deadThreads.size(); i++) {
       ThreadInfo* info = deadThreads.at(i);
-      StreamNameAndThreadId(info->Name(), info->ThreadId());
+      StreamNameAndThreadId(aWriter, info->Name(), info->ThreadId());
     }
   }
   aWriter.EndArray();
 
   aWriter.DoubleProperty(
     "start", static_cast<double>(mozilla::tasktracer::GetStartTime()));
 #endif
 }