Closed Bug 1443672 Opened 2 years ago Closed 2 years ago

Fix a few .cpp files in layout/base and layout/generic to #include their own header first

Categories

(Core :: Layout, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

We have a convention that Foo.cpp should list Foo.h as its very-first #include.  

(This helps us ensure that Foo.h has all of the requisite #includes/forward-declarations to build successfully on its own.  At least when building in non-unified mode, this gives us that assurance, for all headers that have a corresponding .cpp file.)

When reviewing bug 1024082, I noticed a few .cpp files in layout/base and layout/generic that don't do this. Filing this bug on cleaning that up.

(I'm layering this on top of the patches from bug 1024082 -- and this caught one minor issue with that bug's patches, which I noted in bug 1024082 comment 16.)
Comment on attachment 8956655 [details]
Bug 1443672: Adjust a few .cpp files in layout to #include their own header first.

https://reviewboard.mozilla.org/r/225622/#review231490

r=me, thanks!
Attachment #8956655 - Flags: review?(emilio) → review+
Oops, I triggered autoland and then noticed this has some failures on Try (i.e. it flushed out a few latent issues):
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b48bc87c88f1cfdded548a64da5a80ab9699e44c

Autoland is already closed, but once it reopens this is queued up to go in and then will need a backout & more investigation.
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/04fecea9eaf0
Adjust a few .cpp files in layout to #include their own header first. r=emilio
Oh! It looks like the (legitimate, latent) build errors from my try push were triggered by the "disable-unified-layout-base-and-generic.patch" helper-patch that I was building on top of -- they were *not* triggered by the main patch here.

The autoland cycle (which just has the main patch) had entirely green builds, aside from one known intermittent -- see treeherder link in comment 5.  So this is OK to be landed after all. Phew!  I'll re-land.
Flags: needinfo?(dholbert)
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/096ff7498b44
Adjust a few .cpp files in layout to #include their own header first. r=emilio
https://hg.mozilla.org/mozilla-central/rev/096ff7498b44
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.