Skip to content

Commit

Permalink
REGRESSION(276461@main) AttributedString include broke GLIB Debug builds
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=271425

Reviewed by Alex Christensen and Sihui Liu.

Guard AttributedString occurrences with PLATFORM(COCOA)

* Source/WebKit/Scripts/webkit/messages.py:
(conditions_for_header):
* Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
(IPC::serializedIdentifiers):
* Source/WebKit/Shared/WTFArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/276510@main
  • Loading branch information
lauromoura authored and achristensen07 committed Mar 22, 2024
1 parent 639f7f3 commit 2059c64
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/WebKit/Scripts/webkit/messages.py
Expand Up @@ -515,6 +515,7 @@ def conditions_for_header(header):
'"SharedCARingBuffer.h"': ["PLATFORM(COCOA)"],
'"WCContentBufferIdentifier.h"': ["USE(GRAPHICS_LAYER_WC)"],
'"WCLayerTreeHostIdentifier.h"': ["USE(GRAPHICS_LAYER_WC)"],
'<WebCore/AttributedString.h>': ["PLATFORM(COCOA)", ],
'<WebCore/CVUtilities.h>': ["PLATFORM(COCOA)", ],
'<WebCore/DataDetectorType.h>': ["ENABLE(DATA_DETECTION)"],
'<WebCore/DynamicContentScalingDisplayList.h>': ["ENABLE(RE_DYNAMIC_CONTENT_SCALING)"],
Expand Down
10 changes: 10 additions & 0 deletions Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp
Expand Up @@ -102,7 +102,9 @@
#include "WebPageProxyIdentifier.h"
#include "WebTransportSession.h"
#include "WebURLSchemeHandlerIdentifier.h"
#if PLATFORM(COCOA)
#include <WebCore/AttributedString.h>
#endif
#include <WebCore/BackgroundFetchRecordIdentifier.h>
#include <WebCore/BroadcastChannelIdentifier.h>
#include <WebCore/DictationContext.h>
Expand Down Expand Up @@ -454,8 +456,12 @@ std::optional<JSC::JSValue> jsValueForReplyArguments(JSC::JSGlobalObject* global
Vector<ASCIILiteral> serializedIdentifiers()
{
static_assert(sizeof(uint64_t) == sizeof(IPC::AsyncReplyID));
#if PLATFORM(COCOA)
static_assert(sizeof(uint64_t) == sizeof(WebCore::AttributedStringTextTableBlockID));
#endif
#if PLATFORM(COCOA)
static_assert(sizeof(uint64_t) == sizeof(WebCore::AttributedStringTextTableID));
#endif
static_assert(sizeof(uint64_t) == sizeof(WebCore::BackgroundFetchRecordIdentifier));
static_assert(sizeof(uint64_t) == sizeof(WebCore::BroadcastChannelIdentifier));
static_assert(sizeof(uint64_t) == sizeof(WebCore::DictationContext));
Expand Down Expand Up @@ -575,8 +581,12 @@ Vector<ASCIILiteral> serializedIdentifiers()
static_assert(sizeof(uint64_t) == sizeof(WebKit::WebURLSchemeHandlerIdentifier));
return {
"IPC::AsyncReplyID"_s,
#if PLATFORM(COCOA)
"WebCore::AttributedStringTextTableBlockID"_s,
#endif
#if PLATFORM(COCOA)
"WebCore::AttributedStringTextTableID"_s,
#endif
"WebCore::BackgroundFetchRecordIdentifier"_s,
"WebCore::BroadcastChannelIdentifier"_s,
"WebCore::DictationContext"_s,
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit/Shared/WTFArgumentCoders.serialization.in
Expand Up @@ -117,8 +117,10 @@ template: enum class WebKit::WCLayerTreeHostIdentifierType
template: enum class WebKit::WebExtensionControllerIdentifierType
template: enum class WebKit::XRDeviceIdentifierType
template: struct WebCore::AttributedStringTextListIDType
#if PLATFORM(COCOA)
template: struct WebCore::AttributedStringTextTableBlockIDType
template: struct WebCore::AttributedStringTextTableIDType
#endif
template: struct WebCore::BackForwardItemIdentifierType
template: struct WebCore::DictationContextType
template: struct WebCore::FrameIdentifierType
Expand Down

0 comments on commit 2059c64

Please sign in to comment.