Closed
Bug 985336
Opened 10 years ago
Closed 10 years ago
Reduce unnecessary #includes in .h files within /layout/style
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(2 files, 1 obsolete file)
755 bytes,
patch
|
Details | Diff | Splinter Review | |
11.60 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
During downtime at the work week, I spun up a patch to drop some unnecessary #includes in layout/style (in some cases replacing them with a forward-declare or a more targeted #include). I tested to make sure my patch doesn't remove any potentially-hidden-dependencies by creating a .cpp file layout/style/tmp.cpp, and added that to moz.build, and recompiling with that file *only* containing a single .h file. (for each .h file in this patch) The command I used (after creating/adding tmp.cpp and qimporting my patch) was: hg qstat | cut -f3 -d'/' > /tmp/files.txt for x in `cat /tmp/files.txt`; do echo "*** TESTING $x ***" ; echo "#include \"$x\"" > layout/style/tmp.cpp && make -s -C ../obj/layout/; done
did you test with unified builds disabled?
Assignee | ||
Comment 2•10 years ago
|
||
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
er, I guess the above does so
Assignee | ||
Updated•10 years ago
|
Attachment #8393375 -
Attachment is obsolete: true
Assignee | ||
Comment 4•10 years ago
|
||
Yeah, I added tmp.cpp to SOURCES in moz.build, not UNIFIED_SOURCES.
Assignee | ||
Comment 5•10 years ago
|
||
(for the record, here's the patch to add tmp.cpp to moz.build and create the empty tmp.cpp file) (Reposting the actual patch in a minute. Previous version included a tweak to tmp.cpp, which I'm removing now, and also adding one more include-removal.)
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8393381 -
Flags: review?(dbaron)
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8393381 [details] [diff] [review] fix v2 >+++ b/layout/style/nsDOMCSSDeclaration.h > #include "nsICSSDeclaration.h" > > #include "mozilla/Attributes.h" >+#include "nsIURI.h" NOTE: In this file, I'm *adding* an include. This file was previously depending on getting that #include indirectly, via nsICSSDeclaration.h, and I'm removing it from nsICSSDeclaration.h, so I have to add it here. * (We need the include here because this file has nsCOMPtr<nsIURI>, which doesn't compile unless it knows that nsIURI inherits from nsISupports, which it can only tell by seeing the header file)
Comment on attachment 8393381 [details] [diff] [review] fix v2 r=dbaron. Worth a try run or a test on one of the builds that does non-unified builds before landing.
Attachment #8393381 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Thanks! All-builds try run, for good measure: https://tbpl.mozilla.org/?tree=Try&rev=7d877f1798ec
Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d2c462515397
Assignee | ||
Updated•10 years ago
|
Flags: in-testsuite-
Assignee | ||
Comment 11•10 years ago
|
||
(FWIW, I re-ran the command at the end of comment 0, to be sure that all the .h files touched by the patch end up being compilable on their own.)
Comment 12•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d2c462515397
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•