Bug 1356752 - Fix --enable-tasktracer build by adding the missing aWriter argument. r=njn
authorMarkus Stange <mstange@themasta.com>
Sat, 15 Apr 2017 00:22:07 -0400
changeset 563310 3ccf70e977bd7bc5b2c0b3b1890c34b226afee57
parent 563309 5c9b668ee568bd506fe720868e3c018e2b71eb89
child 563311 45f5b5a65b7fffa5d68931d427f547ac4443a10e
push id54258
push usercpeterson@mozilla.com
push dateSun, 16 Apr 2017 05:52:14 +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
@@ -1161,17 +1161,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);
@@ -1196,23 +1196,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
 }