I noticed while working on bug 1252877, that ResolveRefLayers was using , when it might as well be using . Also, DetachRefLayers would be better using ForEachNodePostOrder and there were checks being done that I think are only needed during Resolve.  https://hg.mozilla.org/mozilla-central/file/214884d507ee/gfx/layers/TreeTraversal.h#l136  https://hg.mozilla.org/mozilla-central/file/214884d507ee/gfx/layers/TreeTraversal.h#l146
Created attachment 8769744 [details] [diff] [review] Improve ForEachNode use in Resolve/DetachRefLayers
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/6044eec77a2c Improve ForEachNode use in Resolve/DetachRefLayers. r=mattwoodrow
Backout by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/940674ad1be3 Backed out changeset 6044eec77a2c for bustage on a CLOSED TREE
I'd only run static analysis on Linux, but on Mac and Android willResolvePlugins is no longer passed to a function, so now flagged as unused. Here's a try push with a #if added for that, I also added the null check for aCompositor into that bool, because there is no point doing it every time in the loop: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b3da3c7b712e I think these changes are small enough to not need a re-review.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/bd659292794f Improve ForEachNode use in Resolve/DetachRefLayers. r=mattwoodrow