| Summary: | [UNIX] Reorganize and cleanup main functions of GTK and EFL ports | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||||||||
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | bunhere, cdumez, commit-queue, gustavo, gyuyoung.kim, rakuco, sergio, svillar | ||||||||||
| Priority: | P2 | Keywords: | Gtk | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Carlos Garcia Campos
2014-04-01 02:49:03 PDT
Created attachment 228260 [details]
Patch
hmm, I think this approach doesn't work, I'm trying a new one Created attachment 228267 [details]
Updated patch
Slightly different approach to ensure that main() functions only depend on a public symbol in the libs like current code does.
Attachment 228267 [details] did not pass style-queue:
ERROR: Source/WebKit2/NetworkProcess/efl/NetworkProcessMainEfl.cpp:33: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp:33: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:29: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:30: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:30: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:31: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
Total errors found: 6 in 16 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 228269 [details]
Try to fix EFL build
Use WK_EXPORT instead of WTF_EXPORT
Attachment 228269 [details] did not pass style-queue:
ERROR: Source/WebKit2/NetworkProcess/efl/NetworkProcessMainEfl.cpp:33: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp:33: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:29: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:30: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:30: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:31: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
Total errors found: 6 in 16 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 228269 [details] Try to fix EFL build View in context: https://bugs.webkit.org/attachment.cgi?id=228269&action=review I'm unsure how much complexity and code this saves, it doesn't look like a lot, but I you're probably a better judge of that than me. One thing that bothers me is that in theory we could use these same implementations for Gtk on Windows, say, but I guess Unix is still sensible as a name since we'd be using GNU libraries even on windows, so r=me. > Source/WebKit2/ChangeLog:8 > + Move main function implementation files to <process-dir>/EntryPoint/unix/ProcessNameMain.cpp add <> around ProcessName to be clearer? (In reply to comment #7) > (From update of attachment 228269 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=228269&action=review Thanks for the review. > I'm unsure how much complexity and code this saves, it doesn't look like a lot, but I you're probably a better judge of that than me. One thing that bothers me is that in theory we could use these same implementations for Gtk on Windows, say, but I guess Unix is still sensible as a name since we'd be using GNU libraries even on windows, so r=me. Well, this is more about keeping consistency than saving code. When I moved the NEWS file to Source/WebKit2/gtk I noticed there was a MainGtk.cpp file there. And I thought Main what? it ended up being the main function of the WebProcess. When we only had one process, it probably was less confusing, but still misplaced, it should be in Source/WebKit2/WebProcess/gtk at least. Then I looked at the different main functions, and noticed that in some cases we were sharing the implementation with EFL (but with a full of ifdefs) and in others every port had its own file. So, I took a look at what apple did for the entry points, and inspired by the mac implementation I reorganized the "unix" entry points. > > Source/WebKit2/ChangeLog:8 > > + Move main function implementation files to <process-dir>/EntryPoint/unix/ProcessNameMain.cpp > > add <> around ProcessName to be clearer? Ok Created attachment 231951 [details]
Rebased patch for landing
Attachment 231951 [details] did not pass style-queue:
ERROR: Source/WebKit2/NetworkProcess/efl/NetworkProcessMainEfl.cpp:33: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp:33: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:29: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:30: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:30: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:31: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
Total errors found: 6 in 16 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Committed r169255: <http://trac.webkit.org/changeset/169255> |