Bug 63475 - Use specific headers includes rather than full system headers.
Summary: Use specific headers includes rather than full system headers.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexis Menard (darktears)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-27 13:14 PDT by Alexis Menard (darktears)
Modified: 2011-06-27 14:23 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.95 KB, patch)
2011-06-27 13:18 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Menard (darktears) 2011-06-27 13:14:57 PDT
Use specific headers includes rather than full system headers.
Comment 1 Alexis Menard (darktears) 2011-06-27 13:18:15 PDT
Created attachment 98773 [details]
Patch
Comment 2 Darin Adler 2011-06-27 13:28:25 PDT
Comment on attachment 98773 [details]
Patch

Is there a concrete benefit to this change? I ask, because due to the way precompiled headers and such work, the other teams at Apple have told us that best practice is to include the complete header, not the specific headers, for system frameworks like these.
Comment 3 Alexis Menard (darktears) 2011-06-27 13:30:54 PDT
(In reply to comment #2)
> (From update of attachment 98773 [details])
> Is there a concrete benefit to this change? I ask, because due to the way precompiled headers and such work, the other teams at Apple have told us that best practice is to include the complete header, not the specific headers, for system frameworks like these.

Quoting Sam Weinig who send me an email :

"The inclusion of <Cocoa/Cocoa.h> in header files seems really suspect here.  I have been trying to remove as many full system header inclusions as possible, and this seems like a step in the wrong direction."
Comment 4 Darin Adler 2011-06-27 13:33:43 PDT
Comment on attachment 98773 [details]
Patch

OK. If Sam says this is the right thing to do, I guess that’s OK.
Comment 5 WebKit Review Bot 2011-06-27 14:23:44 PDT
Comment on attachment 98773 [details]
Patch

Clearing flags on attachment: 98773

Committed r89858: <http://trac.webkit.org/changeset/89858>
Comment 6 WebKit Review Bot 2011-06-27 14:23:48 PDT
All reviewed patches have been landed.  Closing bug.