Title: [284215] trunk
Revision
284215
Author
[email protected]
Date
2021-10-14 16:48:32 -0700 (Thu, 14 Oct 2021)

Log Message

Fix build failures with newer clang
https://bugs.webkit.org/show_bug.cgi?id=231783

Reviewed by Chris Dumez.

Source/WebKit:

We do not need to define copy constructor and assignment operator if we would like to use the default implementation.
The default copy constructor and assignment operator works well for TouchBarMenuItemData, so let's drop it.

* Shared/TouchBarMenuItemData.h:

Source/WTF:

In Identified case, we make copy constructor and assignment operator protected in IdentifiedBase to hide
the ability to copy Identified / ThreadSafeIdentified to be copied to IdentifiedBase. So, in the derived
classes, we should define both copy constructor and assignment operator.

* wtf/Identified.h:

Tools:

Since this is Objective-C (not Objective-C++), we cannot use `static const uint32_t` value for array size.
Use enum hack instead.

* DumpRenderTree/mac/LayoutTestHelper.m:
(displayUUIDStrings):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (284214 => 284215)


--- trunk/Source/WTF/ChangeLog	2021-10-14 23:35:37 UTC (rev 284214)
+++ trunk/Source/WTF/ChangeLog	2021-10-14 23:48:32 UTC (rev 284215)
@@ -1,3 +1,16 @@
+2021-10-14  Yusuke Suzuki  <[email protected]>
+
+        Fix build failures with newer clang
+        https://bugs.webkit.org/show_bug.cgi?id=231783
+
+        Reviewed by Chris Dumez.
+
+        In Identified case, we make copy constructor and assignment operator protected in IdentifiedBase to hide
+        the ability to copy Identified / ThreadSafeIdentified to be copied to IdentifiedBase. So, in the derived
+        classes, we should define both copy constructor and assignment operator.
+
+        * wtf/Identified.h:
+
 2021-10-14  Alex Christensen  <[email protected]>
 
         Remove Variant.h

Modified: trunk/Source/WTF/wtf/Identified.h (284214 => 284215)


--- trunk/Source/WTF/wtf/Identified.h	2021-10-14 23:35:37 UTC (rev 284214)
+++ trunk/Source/WTF/wtf/Identified.h	2021-10-14 23:48:32 UTC (rev 284215)
@@ -61,6 +61,7 @@
     }
 
     Identified(const Identified&) = default;
+    Identified& operator=(const Identified&) = default;
 
     explicit Identified(uint64_t identifier)
         : IdentifiedBase<uint64_t, T>(identifier)
@@ -84,6 +85,7 @@
     }
 
     ThreadSafeIdentified(const ThreadSafeIdentified&) = default;
+    ThreadSafeIdentified& operator=(const ThreadSafeIdentified&) = default;
 
     explicit ThreadSafeIdentified(uint64_t identifier)
         : IdentifiedBase<uint64_t, T>(identifier)

Modified: trunk/Source/WebKit/ChangeLog (284214 => 284215)


--- trunk/Source/WebKit/ChangeLog	2021-10-14 23:35:37 UTC (rev 284214)
+++ trunk/Source/WebKit/ChangeLog	2021-10-14 23:48:32 UTC (rev 284215)
@@ -1,3 +1,15 @@
+2021-10-14  Yusuke Suzuki  <[email protected]>
+
+        Fix build failures with newer clang
+        https://bugs.webkit.org/show_bug.cgi?id=231783
+
+        Reviewed by Chris Dumez.
+
+        We do not need to define copy constructor and assignment operator if we would like to use the default implementation.
+        The default copy constructor and assignment operator works well for TouchBarMenuItemData, so let's drop it.
+
+        * Shared/TouchBarMenuItemData.h:
+
 2021-10-14  Peng Liu  <[email protected]>
 
         Promote WKPreferences._needsSiteSpecificQuirks to API

Modified: trunk/Source/WebKit/Shared/TouchBarMenuItemData.h (284214 => 284215)


--- trunk/Source/WebKit/Shared/TouchBarMenuItemData.h	2021-10-14 23:35:37 UTC (rev 284214)
+++ trunk/Source/WebKit/Shared/TouchBarMenuItemData.h	2021-10-14 23:48:32 UTC (rev 284215)
@@ -50,7 +50,6 @@
 struct TouchBarMenuItemData {
     explicit TouchBarMenuItemData() = default;
     explicit TouchBarMenuItemData(const WebCore::HTMLMenuItemElement&);
-    explicit TouchBarMenuItemData(const TouchBarMenuItemData&) = default;
     
     void encode(IPC::Encoder&) const;
     static std::optional<TouchBarMenuItemData> decode(IPC::Decoder&);

Modified: trunk/Tools/ChangeLog (284214 => 284215)


--- trunk/Tools/ChangeLog	2021-10-14 23:35:37 UTC (rev 284214)
+++ trunk/Tools/ChangeLog	2021-10-14 23:48:32 UTC (rev 284215)
@@ -1,3 +1,16 @@
+2021-10-14  Yusuke Suzuki  <[email protected]>
+
+        Fix build failures with newer clang
+        https://bugs.webkit.org/show_bug.cgi?id=231783
+
+        Reviewed by Chris Dumez.
+
+        Since this is Objective-C (not Objective-C++), we cannot use `static const uint32_t` value for array size.
+        Use enum hack instead.
+
+        * DumpRenderTree/mac/LayoutTestHelper.m:
+        (displayUUIDStrings):
+
 2021-10-14  Peng Liu  <[email protected]>
 
         Promote WKPreferences._needsSiteSpecificQuirks to API

Modified: trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m (284214 => 284215)


--- trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m	2021-10-14 23:35:37 UTC (rev 284214)
+++ trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m	2021-10-14 23:48:32 UTC (rev 284215)
@@ -110,7 +110,7 @@
 {
     NSMutableArray *result = [NSMutableArray array];
 
-    static const uint32_t maxDisplayCount = 10;
+    enum { maxDisplayCount = 10 };
     CGDirectDisplayID displayIDs[maxDisplayCount] = { 0 };
     uint32_t displayCount = 0;
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to