Title: [282190] trunk/Source
Revision
282190
Author
hironori.fu...@sony.com
Date
2021-09-08 20:31:01 -0700 (Wed, 08 Sep 2021)

Log Message

generated MessageArgumentDescriptions.cpp can't compile for non-Cocoa ports due to missing headers
https://bugs.webkit.org/show_bug.cgi?id=230075

Reviewed by Ryosuke Niwa.

Source/WebCore:

* workers/service/ServiceWorkerFetchResult.h: Added a missing
header inclusion for MessageArgumentDescriptions.cpp.

Source/WebKit:

The generated MessageArgumentDescriptions.cpp unconditionally
included platform specific headers, for example
<WebCore/CAAudioStreamDescription.h>.

generate_message_argument_description_implementation generates the
#includes, it should take receiver.condition into account.

* CMakeLists.txt:
(GENERATE_MESSAGE_SOURCES): Added MessageArgumentDescriptions.cpp to compile.
* Scripts/webkit/messages.py:
(generate_message_argument_description_implementation):
* Scripts/webkit/tests/MessageArgumentDescriptions.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (282189 => 282190)


--- trunk/Source/WebCore/ChangeLog	2021-09-09 02:46:01 UTC (rev 282189)
+++ trunk/Source/WebCore/ChangeLog	2021-09-09 03:31:01 UTC (rev 282190)
@@ -1,5 +1,15 @@
 2021-09-08  Fujii Hironori  <hironori.fu...@sony.com>
 
+        generated MessageArgumentDescriptions.cpp can't compile for non-Cocoa ports due to missing headers
+        https://bugs.webkit.org/show_bug.cgi?id=230075
+
+        Reviewed by Ryosuke Niwa.
+
+        * workers/service/ServiceWorkerFetchResult.h: Added a missing
+        header inclusion for MessageArgumentDescriptions.cpp.
+
+2021-09-08  Fujii Hironori  <hironori.fu...@sony.com>
+
         KeyboardEvent should setDefaultHandled if EventHandler::startKeyboardScrolling returns true
         https://bugs.webkit.org/show_bug.cgi?id=229784
 

Modified: trunk/Source/WebCore/workers/service/ServiceWorkerFetchResult.h (282189 => 282190)


--- trunk/Source/WebCore/workers/service/ServiceWorkerFetchResult.h	2021-09-09 02:46:01 UTC (rev 282189)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerFetchResult.h	2021-09-09 03:31:01 UTC (rev 282190)
@@ -31,6 +31,7 @@
 #include "CrossOriginEmbedderPolicy.h"
 #include "ResourceError.h"
 #include "ScriptBuffer.h"
+#include "ServiceWorkerJobDataIdentifier.h"
 #include "ServiceWorkerRegistrationKey.h"
 #include "ServiceWorkerTypes.h"
 

Modified: trunk/Source/WebKit/CMakeLists.txt (282189 => 282190)


--- trunk/Source/WebKit/CMakeLists.txt	2021-09-09 02:46:01 UTC (rev 282189)
+++ trunk/Source/WebKit/CMakeLists.txt	2021-09-09 03:31:01 UTC (rev 282190)
@@ -455,8 +455,12 @@
         )
         list(APPEND ${_output_source} ${WebKit_DERIVED_SOURCES_DIR}/${_name}MessageReceiver.cpp)
     endforeach ()
-    list(APPEND ${_output_source} ${WebKit_DERIVED_SOURCES_DIR}/MessageNames.cpp)
 
+    list(APPEND ${_output_source}
+        ${WebKit_DERIVED_SOURCES_DIR}/MessageArgumentDescriptions.cpp
+        ${WebKit_DERIVED_SOURCES_DIR}/MessageNames.cpp
+    )
+
     add_custom_command(
         OUTPUT
             ${WebKit_DERIVED_SOURCES_DIR}/MessageArgumentDescriptions.cpp

Modified: trunk/Source/WebKit/ChangeLog (282189 => 282190)


--- trunk/Source/WebKit/ChangeLog	2021-09-09 02:46:01 UTC (rev 282189)
+++ trunk/Source/WebKit/ChangeLog	2021-09-09 03:31:01 UTC (rev 282190)
@@ -1,3 +1,23 @@
+2021-09-08  Fujii Hironori  <hironori.fu...@sony.com>
+
+        generated MessageArgumentDescriptions.cpp can't compile for non-Cocoa ports due to missing headers
+        https://bugs.webkit.org/show_bug.cgi?id=230075
+
+        Reviewed by Ryosuke Niwa.
+
+        The generated MessageArgumentDescriptions.cpp unconditionally
+        included platform specific headers, for example
+        <WebCore/CAAudioStreamDescription.h>.
+
+        generate_message_argument_description_implementation generates the
+        #includes, it should take receiver.condition into account.
+
+        * CMakeLists.txt:
+        (GENERATE_MESSAGE_SOURCES): Added MessageArgumentDescriptions.cpp to compile.
+        * Scripts/webkit/messages.py:
+        (generate_message_argument_description_implementation):
+        * Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
+
 2021-09-08  Tim Horton  <timothy_hor...@apple.com>
 
         WKWebView specific bug: WKWebView as the contents of a SceneKit/ARKit node doesn't work (UIWebView works)

Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (282189 => 282190)


--- trunk/Source/WebKit/Scripts/webkit/messages.py	2021-09-09 02:46:01 UTC (rev 282189)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py	2021-09-09 03:31:01 UTC (rev 282190)
@@ -1231,15 +1231,6 @@
 
 
 def generate_message_argument_description_implementation(receivers, receiver_headers):
-    header_conditions = {
-        '"JSIPCBinding.h"': [None]
-    }
-    for receiver in receivers:
-        if receiver.has_attribute(BUILTIN_ATTRIBUTE):
-            continue
-        header_conditions['"%s"' % messages_header_filename(receiver)] = [None]
-        collect_header_conditions_for_receiver(receiver, header_conditions)
-
     result = []
     result.append(_license_header)
     result.append('#include "config.h"\n')
@@ -1247,7 +1238,21 @@
     result.append('\n')
     result.append('#if ENABLE(IPC_TESTING_API)\n')
     result.append('\n')
-    result += generate_header_includes_from_conditions(header_conditions)
+    result.append('#include "JSIPCBinding.h"\n')
+
+    for receiver in receivers:
+        if receiver.has_attribute(BUILTIN_ATTRIBUTE):
+            continue
+        if receiver.condition:
+            result.append('#if %s\n' % receiver.condition)
+        header_conditions = {
+            '"%s"' % messages_header_filename(receiver): [None]
+        }
+        collect_header_conditions_for_receiver(receiver, header_conditions)
+        result += generate_header_includes_from_conditions(header_conditions)
+        if receiver.condition:
+            result.append('#endif\n')
+
     result.append('\n')
 
     result.append('namespace IPC {\n')

Modified: trunk/Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp (282189 => 282190)


--- trunk/Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp	2021-09-09 02:46:01 UTC (rev 282189)
+++ trunk/Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp	2021-09-09 03:31:01 UTC (rev 282190)
@@ -27,10 +27,17 @@
 
 #if ENABLE(IPC_TESTING_API)
 
+#include "JSIPCBinding.h"
 #include "ArgumentCoders.h"
-#if USE(AVFOUNDATION)
-#include "ArgumentCodersCF.h"
+#include "TestClassName.h"
+#if ENABLE(TEST_FEATURE)
+#include "TestTwoStateEnum.h"
 #endif
+#include "TestWithSuperclassMessages.h"
+#include <optional>
+#include <wtf/text/WTFString.h>
+#if (ENABLE(WEBKIT2) && (NESTED_MASTER_CONDITION || MASTER_OR && MASTER_AND))
+#include "ArgumentCoders.h"
 #include "Connection.h"
 #if ENABLE(DEPRECATED_FEATURE) || ENABLE(EXPERIMENTAL_FEATURE)
 #include "DummyType.h"
@@ -38,26 +45,11 @@
 #if PLATFORM(MAC)
 #include "GestureTypes.h"
 #endif
-#include "IPCSemaphore.h"
-#include "JSIPCBinding.h"
 #if PLATFORM(MAC)
 #include "MachPort.h"
 #endif
 #include "Plugin.h"
-#include "StreamConnectionBuffer.h"
-#include "TestClassName.h"
-#if ENABLE(TEST_FEATURE)
-#include "TestTwoStateEnum.h"
-#endif
-#include "TestWithCVPixelBufferMessages.h"
-#include "TestWithIfMessageMessages.h"
-#include "TestWithImageDataMessages.h"
 #include "TestWithLegacyReceiverMessages.h"
-#include "TestWithSemaphoreMessages.h"
-#include "TestWithStreamBufferMessages.h"
-#include "TestWithStreamMessages.h"
-#include "TestWithSuperclassMessages.h"
-#include "TestWithoutAttributesMessages.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebPreferencesStore.h"
 #if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION && SOME_OTHER_MESSAGE_CONDITION)) || (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION || SOME_OTHER_MESSAGE_CONDITION))
@@ -64,26 +56,79 @@
 #include "WebTouchEvent.h"
 #endif
 #include <WebCore/GraphicsLayer.h>
-#include <WebCore/ImageData.h>
 #if PLATFORM(MAC)
 #include <WebCore/KeyboardEvent.h>
 #endif
 #include <WebCore/PluginData.h>
-#include <optional>
 #include <utility>
 #include <wtf/HashMap.h>
-#if PLATFORM(COCOA)
-#include <wtf/MachSendRight.h>
+#if PLATFORM(MAC)
+#include <wtf/OptionSet.h>
 #endif
+#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
+#endif
+#if (ENABLE(WEBKIT2) && (NESTED_MASTER_CONDITION || MASTER_OR && MASTER_AND))
+#include "ArgumentCoders.h"
+#include "Connection.h"
+#if ENABLE(DEPRECATED_FEATURE) || ENABLE(EXPERIMENTAL_FEATURE)
+#include "DummyType.h"
+#endif
 #if PLATFORM(MAC)
+#include "GestureTypes.h"
+#endif
+#if PLATFORM(MAC)
+#include "MachPort.h"
+#endif
+#include "Plugin.h"
+#include "TestWithoutAttributesMessages.h"
+#include "WebCoreArgumentCoders.h"
+#include "WebPreferencesStore.h"
+#if (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION && SOME_OTHER_MESSAGE_CONDITION)) || (ENABLE(TOUCH_EVENTS) && (NESTED_MESSAGE_CONDITION || SOME_OTHER_MESSAGE_CONDITION))
+#include "WebTouchEvent.h"
+#endif
+#include <WebCore/GraphicsLayer.h>
+#if PLATFORM(MAC)
+#include <WebCore/KeyboardEvent.h>
+#endif
+#include <WebCore/PluginData.h>
+#include <utility>
+#include <wtf/HashMap.h>
+#if PLATFORM(MAC)
 #include <wtf/OptionSet.h>
 #endif
+#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
+#endif
+#if PLATFORM(COCOA) || PLATFORM(GTK)
+#include "ArgumentCoders.h"
+#endif
+#include "TestWithIfMessageMessages.h"
+#if PLATFORM(COCOA) || PLATFORM(GTK)
+#include <wtf/text/WTFString.h>
+#endif
+#include "IPCSemaphore.h"
+#include "TestWithSemaphoreMessages.h"
+#include "ArgumentCoders.h"
+#include "TestWithImageDataMessages.h"
+#include "WebCoreArgumentCoders.h"
+#include <WebCore/ImageData.h>
 #include <wtf/RefCounted.h>
+#include "ArgumentCoders.h"
+#include "TestWithStreamMessages.h"
+#if PLATFORM(COCOA)
+#include <wtf/MachSendRight.h>
+#endif
+#include <wtf/text/WTFString.h>
+#include "StreamConnectionBuffer.h"
+#include "TestWithStreamBufferMessages.h"
 #if USE(AVFOUNDATION)
+#include "ArgumentCodersCF.h"
+#endif
+#include "TestWithCVPixelBufferMessages.h"
+#if USE(AVFOUNDATION)
 #include <wtf/RetainPtr.h>
 #endif
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
 
 namespace IPC {
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to