Title: [270166] trunk/Source/WTF
- Revision
- 270166
- Author
- [email protected]
- Date
- 2020-11-26 15:56:03 -0800 (Thu, 26 Nov 2020)
Log Message
[WPE][GTK] Fix build with GCC 11
https://bugs.webkit.org/show_bug.cgi?id=219264
Patch by Michael Catanzaro <[email protected]> on 2020-11-26
Reviewed by Carlos Garcia Campos.
It's not uncommon for really old code like this to abuse volatile as if it were a
synchronization primitive. It's not. This code is already synchronized by use of GOnce, so
it can be safely removed. References:
https://gitlab.gnome.org/GNOME/glib/-/issues/600#note_877282
http://isvolatileusefulwiththreads.in/C++/
* wtf/glib/WTFGType.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (270165 => 270166)
--- trunk/Source/WTF/ChangeLog 2020-11-23 03:26:50 UTC (rev 270165)
+++ trunk/Source/WTF/ChangeLog 2020-11-26 23:56:03 UTC (rev 270166)
@@ -1,3 +1,19 @@
+2020-11-26 Michael Catanzaro <[email protected]>
+
+ [WPE][GTK] Fix build with GCC 11
+ https://bugs.webkit.org/show_bug.cgi?id=219264
+
+ Reviewed by Carlos Garcia Campos.
+
+ It's not uncommon for really old code like this to abuse volatile as if it were a
+ synchronization primitive. It's not. This code is already synchronized by use of GOnce, so
+ it can be safely removed. References:
+
+ https://gitlab.gnome.org/GNOME/glib/-/issues/600#note_877282
+ http://isvolatileusefulwiththreads.in/C++/
+
+ * wtf/glib/WTFGType.h:
+
2020-11-21 Simon Fraser <[email protected]>
Add an Experimental Features for wheel event gestures becoming non-blocking
Modified: trunk/Source/WTF/wtf/glib/WTFGType.h (270165 => 270166)
--- trunk/Source/WTF/wtf/glib/WTFGType.h 2020-11-23 03:26:50 UTC (rev 270165)
+++ trunk/Source/WTF/wtf/glib/WTFGType.h 2020-11-26 23:56:03 UTC (rev 270166)
@@ -74,12 +74,12 @@
\
GType type_name##_get_type(void) \
{ \
- static volatile gsize g_define_type_id__volatile = 0; \
- if (g_once_init_enter(&g_define_type_id__volatile)) { \
+ static gsize static_g_define_type_id = 0; \
+ if (g_once_init_enter(&static_g_define_type_id)) { \
GType g_define_type_id = type_name##_get_type_once(); \
- g_once_init_leave(&g_define_type_id__volatile, g_define_type_id); \
+ g_once_init_leave(&static_g_define_type_id, g_define_type_id); \
} \
- return g_define_type_id__volatile; \
+ return static_g_define_type_id; \
} /* Closes type_name##_get_type(). */ \
\
NEVER_INLINE static GType type_name##_get_type_once(void) \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes