Make it possible to not include IPC Messages headers in other headers
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2019 20:02:17 +0000 (20:02 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2019 20:02:17 +0000 (20:02 +0000)
commit44a91bf9af8a8eb844652359fab68a216a9b50ba
tree7755f14c2ff4500aa37ade1d83c08dda50f6f313
parentf6be5c34a1330d15bb04140667e0ce70db16ec6d
Make it possible to not include IPC Messages headers in other headers
https://bugs.webkit.org/show_bug.cgi?id=203074

Reviewed by Geoffrey Garen.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ExceptionDetails.h: Added.
* bindings/js/JSDOMExceptionHandling.h:
Split the ExceptionDetails struct out into its own file.

Source/WebKit:

Make the Messages generator generate a new -MessagesReplies.h file, which
only includes headers for and definitions of DelayedReply/AsyncReply types,
which need to be mentioned as arguments to message hander methods, and
thus must be available in various headers throughout the project.

In order to do this, we have to de-nest them from the primary message
class, but we then 'using' them back into place inside the message class
so that most of the code doesn't need to change.

This helps to wildly decrease the header load of WebPage.h and WebPageProxy.h,
especially, because the number of headers needed for types in their replies
is much smaller than the number needed for all message receivers.

Also, only invoke the Messages generator once per source file, and
only parse the source file once, generating all three output files
in one invocation.

And then clean up all the missing indirect includes that we lost by doing this.

All-in-all this is worth roughly 8% on the WebKit2 Build Time Benchmark.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources.make:
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkResourceLoader.h:
* PluginProcess/PluginControllerProxy.cpp:
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/WebProcessConnection.h:
* Scripts/Makefile:
* Scripts/generate-message-receiver.py:
(main):
* Scripts/generate-messages-header.py: Removed.
* Scripts/webkit/LegacyMessageReceiver-expected.cpp:
* Scripts/webkit/LegacyMessages-expected.h:
* Scripts/webkit/LegacyMessagesReplies-expected.h: Added.
* Scripts/webkit/MessageReceiver-expected.cpp:
* Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
* Scripts/webkit/Messages-expected.h:
* Scripts/webkit/MessagesReplies-expected.h: Added.
* Scripts/webkit/MessagesRepliesSuperclassReplies-expected.h: Added.
* Scripts/webkit/MessagesSuperclass-expected.h:
* Scripts/webkit/messages.py:
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PluginProcessManager.cpp:
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/ProvisionalPageProxy.h:
* UIProcess/SuspendedPageProxy.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.h:
* UIProcess/ios/WKContentView.mm:
* UIProcess/ios/WKContentViewInteraction.mm:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
* WebProcess/cocoa/VideoFullscreenManager.h:
* WebProcess/cocoa/VideoFullscreenManager.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
56 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Headers.cmake
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/ExceptionDetails.h [new file with mode: 0644]
Source/WebCore/bindings/js/JSDOMExceptionHandling.h
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/DerivedSources-input.xcfilelist
Source/WebKit/DerivedSources.make
Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit/NetworkProcess/NetworkResourceLoader.h
Source/WebKit/PluginProcess/PluginControllerProxy.cpp
Source/WebKit/PluginProcess/PluginControllerProxy.h
Source/WebKit/PluginProcess/WebProcessConnection.h
Source/WebKit/Scripts/Makefile
Source/WebKit/Scripts/generate-message-receiver.py
Source/WebKit/Scripts/generate-messages-header.py [deleted file]
Source/WebKit/Scripts/webkit/LegacyMessageReceiver-expected.cpp
Source/WebKit/Scripts/webkit/LegacyMessages-expected.h
Source/WebKit/Scripts/webkit/LegacyMessagesReplies-expected.h [new file with mode: 0644]
Source/WebKit/Scripts/webkit/MessageReceiver-expected.cpp
Source/WebKit/Scripts/webkit/MessageReceiverSuperclass-expected.cpp
Source/WebKit/Scripts/webkit/Messages-expected.h
Source/WebKit/Scripts/webkit/MessagesReplies-expected.h [new file with mode: 0644]
Source/WebKit/Scripts/webkit/MessagesRepliesSuperclassReplies-expected.h [new file with mode: 0644]
Source/WebKit/Scripts/webkit/MessagesSuperclass-expected.h
Source/WebKit/Scripts/webkit/messages.py
Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp
Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.h
Source/WebKit/UIProcess/Downloads/DownloadProxy.h
Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
Source/WebKit/UIProcess/Plugins/PluginProcessManager.cpp
Source/WebKit/UIProcess/Plugins/PluginProcessManager.h
Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h
Source/WebKit/UIProcess/ProvisionalPageProxy.h
Source/WebKit/UIProcess/SuspendedPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/WebProcessProxy.h
Source/WebKit/UIProcess/ios/WKContentView.mm
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp
Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h
Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm