Bug 1209779 - Ensure that all null elements are written when streaming profiler JSON; r=shu, a=lizzard
authorNick Fitzgerald <fitzgen@gmail.com>
Fri, 02 Oct 2015 14:27:40 -0400
changeset 296270 57c9a4a0fe4ace01645bb2187ca9d221503a5a93
parent 296269 105321e376719eca102954c003344a9db25571fd
child 296271 a29ec46942a5b3f4f5dc1be1b6983fa09cb59a19
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu, lizzard
bugs1209779
milestone43.0a2
Bug 1209779 - Ensure that all null elements are written when streaming profiler JSON; r=shu, a=lizzard
tools/profiler/core/ProfileEntry.cpp
--- a/tools/profiler/core/ProfileEntry.cpp
+++ b/tools/profiler/core/ProfileEntry.cpp
@@ -465,16 +465,18 @@ void UniqueStacks::StreamFrame(const OnS
 #endif
     if (aFrame.mLine.isSome()) {
       mFrameTableWriter.NullElement(); // implementation
       mFrameTableWriter.NullElement(); // optimizations
       mFrameTableWriter.IntElement(*aFrame.mLine);
     }
     if (aFrame.mCategory.isSome()) {
       if (aFrame.mLine.isNothing()) {
+        mFrameTableWriter.NullElement(); // implementation
+        mFrameTableWriter.NullElement(); // optimizations
         mFrameTableWriter.NullElement(); // line
       }
       mFrameTableWriter.IntElement(*aFrame.mCategory);
     }
   }
 #ifndef SPS_STANDALONE
   else {
     const JS::ForEachProfiledFrameOp::FrameHandle& jitFrame = *aFrame.mJITFrameHandle;