diff --git a/mozglue/baseprofiler/public/BaseProfilerMarkerPayload.h b/mozglue/baseprofiler/public/BaseProfilerMarkerPayload.h index 215853fcb24e..af76c053e7d7 100644 --- a/mozglue/baseprofiler/public/BaseProfilerMarkerPayload.h +++ b/mozglue/baseprofiler/public/BaseProfilerMarkerPayload.h @@ -67,16 +67,6 @@ class ProfilerMarkerPayload { const TimeStamp& aProcessStartTime, UniqueStacks& aUniqueStacks); - void SetStack(UniqueProfilerBacktrace aStack) { mStack = std::move(aStack); } - - void SetDocShellHistoryId(const Maybe& aDocShellHistoryId) { - mDocShellHistoryId = aDocShellHistoryId; - } - - void SetDocShellId(const Maybe& aDocShellId) { - mDocShellId = aDocShellId; - } - private: TimeStamp mStartTime; TimeStamp mEndTime; @@ -99,13 +89,10 @@ class TracingMarkerPayload : public ProfilerMarkerPayload { const Maybe& aDocShellId = Nothing(), const Maybe& aDocShellHistoryId = Nothing(), UniqueProfilerBacktrace aCause = nullptr) - : mCategory(aCategory), mKind(aKind) { - if (aCause) { - SetStack(std::move(aCause)); - } - SetDocShellId(aDocShellId); - SetDocShellHistoryId(aDocShellHistoryId); - } + : ProfilerMarkerPayload(aDocShellId, aDocShellHistoryId, + std::move(aCause)), + mCategory(aCategory), + mKind(aKind) {} DECL_BASE_STREAM_PAYLOAD diff --git a/tools/profiler/public/ProfilerMarkerPayload.h b/tools/profiler/public/ProfilerMarkerPayload.h index 26693f751cba..098c5c3e11d8 100644 --- a/tools/profiler/public/ProfilerMarkerPayload.h +++ b/tools/profiler/public/ProfilerMarkerPayload.h @@ -74,17 +74,6 @@ class ProfilerMarkerPayload { const mozilla::TimeStamp& aProcessStartTime, UniqueStacks& aUniqueStacks); - void SetStack(UniqueProfilerBacktrace aStack) { mStack = std::move(aStack); } - - void SetDocShellHistoryId( - const mozilla::Maybe& aDocShellHistoryId) { - mDocShellHistoryId = aDocShellHistoryId; - } - - void SetDocShellId(const mozilla::Maybe& aDocShellId) { - mDocShellId = aDocShellId; - } - private: mozilla::TimeStamp mStartTime; mozilla::TimeStamp mEndTime; @@ -107,13 +96,10 @@ class TracingMarkerPayload : public ProfilerMarkerPayload { const mozilla::Maybe& aDocShellId = mozilla::Nothing(), const mozilla::Maybe& aDocShellHistoryId = mozilla::Nothing(), UniqueProfilerBacktrace aCause = nullptr) - : mCategory(aCategory), mKind(aKind) { - if (aCause) { - SetStack(std::move(aCause)); - } - SetDocShellId(aDocShellId); - SetDocShellHistoryId(aDocShellHistoryId); - } + : ProfilerMarkerPayload(aDocShellId, aDocShellHistoryId, + std::move(aCause)), + mCategory(aCategory), + mKind(aKind) {} DECL_STREAM_PAYLOAD @@ -344,12 +330,8 @@ class StyleMarkerPayload : public ProfilerMarkerPayload { const mozilla::Maybe& aDocShellId, const mozilla::Maybe& aDocShellHistoryId) : ProfilerMarkerPayload(aStartTime, aEndTime, aDocShellId, - aDocShellHistoryId), - mStats(aStats) { - if (aCause) { - SetStack(std::move(aCause)); - } - } + aDocShellHistoryId, std::move(aCause)), + mStats(aStats) {} DECL_STREAM_PAYLOAD