diff --git a/mozglue/baseprofiler/core/ProfilerMarkers.cpp b/mozglue/baseprofiler/core/ProfilerMarkers.cpp index bd72a4789b0f..4044733e9f1c 100644 --- a/mozglue/baseprofiler/core/ProfilerMarkers.cpp +++ b/mozglue/baseprofiler/core/ProfilerMarkers.cpp @@ -90,10 +90,18 @@ void MarkerSchema::Stream(JSONWriter& aWriter, { aWriter.StringProperty("name", aName); + if (!mChartLabel.empty()) { + aWriter.StringProperty("chartLabel", mChartLabel); + } + if (!mTooltipLabel.empty()) { aWriter.StringProperty("tooltipLabel", mTooltipLabel); } + if (!mTableLabel.empty()) { + aWriter.StringProperty("tableLabel", mTableLabel); + } + aWriter.StartArrayProperty("display"); { for (Location location : mLocations) { diff --git a/tools/profiler/tests/gtest/GeckoProfiler.cpp b/tools/profiler/tests/gtest/GeckoProfiler.cpp index 5ff50c55e9ab..dc112c993ec6 100644 --- a/tools/profiler/tests/gtest/GeckoProfiler.cpp +++ b/tools/profiler/tests/gtest/GeckoProfiler.cpp @@ -1471,10 +1471,9 @@ TEST(GeckoProfiler, Markers) EXPECT_EQ(display[5u].asString(), "timeline-fileio"); EXPECT_EQ(display[6u].asString(), "stack-chart"); - // TODO Uncomment when fixed in next patch. - // EXPECT_EQ_JSON(schema["chartLabel"], String, "chart label"); + EXPECT_EQ_JSON(schema["chartLabel"], String, "chart label"); EXPECT_EQ_JSON(schema["tooltipLabel"], String, "tooltip label"); - // EXPECT_EQ_JSON(schema["tableLabel"], String, "table label"); + EXPECT_EQ_JSON(schema["tableLabel"], String, "table label"); ASSERT_EQ(data.size(), 14u);