Title: [153400] trunk/Source/WTF
- Revision
- 153400
- Author
- [email protected]
- Date
- 2013-07-27 14:40:26 -0700 (Sat, 27 Jul 2013)
Log Message
REGRESSION(r153380): Can't open messages on Gmail
https://bugs.webkit.org/show_bug.cgi?id=119165
Patch by Ryosuke Niwa <[email protected]> on 2013-07-27
Reviewed by Andreas Kling.
This bug was caused by r153380. The bug doesn't reproduce as long as WebKit is built by clang 4.2 and later
or final is disabled (it could be clang 4.1 and later but we don't have information about that).
Fix the bug by disabling final on earlier versions of clang. Unfortunately we can only check versions of
Apple clang since __clang_major__ and __clang_minor__ are vendor dependent.
* wtf/Compiler.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (153399 => 153400)
--- trunk/Source/WTF/ChangeLog 2013-07-27 20:49:12 UTC (rev 153399)
+++ trunk/Source/WTF/ChangeLog 2013-07-27 21:40:26 UTC (rev 153400)
@@ -1,3 +1,18 @@
+2013-07-27 Ryosuke Niwa <[email protected]>
+
+ REGRESSION(r153380): Can't open messages on Gmail
+ https://bugs.webkit.org/show_bug.cgi?id=119165
+
+ Reviewed by Andreas Kling.
+
+ This bug was caused by r153380. The bug doesn't reproduce as long as WebKit is built by clang 4.2 and later
+ or final is disabled (it could be clang 4.1 and later but we don't have information about that).
+
+ Fix the bug by disabling final on earlier versions of clang. Unfortunately we can only check versions of
+ Apple clang since __clang_major__ and __clang_minor__ are vendor dependent.
+
+ * wtf/Compiler.h:
+
2013-07-26 Oliver Hunt <[email protected]>
ASSERT failure in wtf/CheckedBoolean.h line 43 on Windows
Modified: trunk/Source/WTF/wtf/Compiler.h (153399 => 153400)
--- trunk/Source/WTF/wtf/Compiler.h 2013-07-27 20:49:12 UTC (rev 153399)
+++ trunk/Source/WTF/wtf/Compiler.h 2013-07-27 21:40:26 UTC (rev 153400)
@@ -58,6 +58,16 @@
#define WTF_COMPILER_SUPPORTS_C_STATIC_ASSERT __has_feature(c_static_assert)
#define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT __has_feature(cxx_static_assert)
#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL __has_feature(cxx_override_control)
+
+#ifdef __APPLE__
+/* Enable final only on clang 4.2 and later to avoid bugs like http://webkit.org/b/119165 */
+#define APPLE_CLANG_VERSION_AT_LEAST(major, minor) (defined(__clang_major__) && __clang_major__ >= major && __clang_minor__ >= minor)
+#define WTF_COMPILER_SUPPORTS_CXX_FINAL_CONTROL WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL && APPLE_CLANG_VERSION_AT_LEAST(4, 2)
+#else
+/* We don't know which versions of clang has the bug mentioned above since __clang_major__ and __clang_minor__ are vendor dependent */
+#define WTF_COMPILER_SUPPORTS_CXX_FINAL_CONTROL WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL
+#endif
+
#define WTF_COMPILER_SUPPORTS_HAS_TRIVIAL_DESTRUCTOR __has_feature(has_trivial_destructor)
#define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums)
#define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions)
@@ -82,6 +92,7 @@
#if !COMPILER(CLANG)
#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
+#define WTF_COMPILER_SUPPORTS_CXX_FINAL_CONTROL 1
#define WTF_COMPILER_QUIRK_FINAL_IS_CALLED_SEALED 1
#endif
@@ -149,6 +160,7 @@
#endif
#if GCC_VERSION_AT_LEAST(4, 7, 0)
#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
+#define WTF_COMPILER_SUPPORTS_CXX_FINAL_CONTROL 1
#endif
#endif /* defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(__cplusplus) && __cplusplus >= 201103L) */
#endif /* COMPILER(GCC) */
@@ -265,15 +277,17 @@
#if COMPILER_SUPPORTS(CXX_OVERRIDE_CONTROL)
#define OVERRIDE override
+#else
+#define OVERRIDE
+#endif
+#if COMPILER_SUPPORTS(CXX_FINAL_CONTROL)
#if COMPILER_QUIRK(FINAL_IS_CALLED_SEALED)
#define FINAL sealed
#else
#define FINAL final
#endif
-
#else
-#define OVERRIDE
#define FINAL
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes