Bug 1349856 - Reinstate proper usage of mReflowCause. r=froydnj a=gchang
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 23 Mar 2017 17:15:54 +1100
changeset 395423 58fe3ca31f9ee2f637de6918a4fabaae350aff7d
parent 395422 3e1b6f069e4862788cfec4506ca4f7e94e3c46a7
child 395424 40527edab13ccbae51459acccd480fd6b394885f
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj, gchang
bugs1349856, 1322553
milestone54.0a2
Bug 1349856 - Reinstate proper usage of mReflowCause. r=froydnj a=gchang Bug 1322553 introduced GeckoProfilerTracingRAII. Part 2 converted a bunch of places to use it, but messed one of them up: > - profiler_tracing("Paint", "Reflow", Move(mReflowCause), TRACING_INTERVAL_START); > + tracingLayoutFlush.emplace("Paint", "Reflow"); The Move(mReflowCause) was erroneously deleted. (There was a similar case with Move(mStyleCause) that was not deleted.) This patch reinstates the Move(mReflowCause).
layout/base/nsRefreshDriver.cpp
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -1884,17 +1884,17 @@ nsRefreshDriver::Tick(int64_t aNowEpoch,
            j && mPresContext && mPresContext->GetPresShell(); --j) {
         // Make sure to not process observers which might have been removed
         // during previous iterations.
         nsIPresShell* shell = observers[j - 1];
         if (!mLayoutFlushObservers.Contains(shell))
           continue;
 
         if (!tracingLayoutFlush) {
-          tracingLayoutFlush.emplace("Paint", "Reflow");
+          tracingLayoutFlush.emplace("Paint", "Reflow", Move(mReflowCause));
           mReflowCause = nullptr;
         }
 
         nsCOMPtr<nsIPresShell> shellKungFuDeathGrip(shell);
         mLayoutFlushObservers.RemoveElement(shell);
         shell->mReflowScheduled = false;
         shell->mSuppressInterruptibleReflows = false;
         FlushType flushType = HasPendingAnimations(shell)