Title: [287265] trunk/Source/WTF
Revision
287265
Author
[email protected]
Date
2021-12-20 09:57:41 -0800 (Mon, 20 Dec 2021)

Log Message

MSVC reports "wtf/RetainPtr.h(196): error C3861: 'CFAutorelease': identifier not found " with /permissive- on Windows
https://bugs.webkit.org/show_bug.cgi?id=202842

Reviewed by Darin Adler.

r287200 fixed the problem, but not a right fix.

* wtf/PlatformHave.h: Defined a new macro HAVE_CFAUTORELEASE for PLATFORM(COCOA).
* wtf/RetainPtr.h: Use HAVE(CFAUTORELEASE) instead of PLATFORM(COCOA).

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (287264 => 287265)


--- trunk/Source/WTF/ChangeLog	2021-12-20 17:45:19 UTC (rev 287264)
+++ trunk/Source/WTF/ChangeLog	2021-12-20 17:57:41 UTC (rev 287265)
@@ -1,3 +1,15 @@
+2021-12-20  Fujii Hironori  <[email protected]>
+
+        MSVC reports "wtf/RetainPtr.h(196): error C3861: 'CFAutorelease': identifier not found " with /permissive- on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=202842
+
+        Reviewed by Darin Adler.
+
+        r287200 fixed the problem, but not a right fix.
+
+        * wtf/PlatformHave.h: Defined a new macro HAVE_CFAUTORELEASE for PLATFORM(COCOA).
+        * wtf/RetainPtr.h: Use HAVE(CFAUTORELEASE) instead of PLATFORM(COCOA).
+
 2021-12-19  Brady Eidson  <[email protected]>
 
         Stub out NotificationEvent and related

Modified: trunk/Source/WTF/wtf/PlatformHave.h (287264 => 287265)


--- trunk/Source/WTF/wtf/PlatformHave.h	2021-12-20 17:45:19 UTC (rev 287264)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2021-12-20 17:57:41 UTC (rev 287265)
@@ -1123,3 +1123,7 @@
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
 #define HAVE_NSSCREEN_SAFE_AREA 1
 #endif
+
+#if PLATFORM(COCOA)
+#define HAVE_CFAUTORELEASE 1
+#endif

Modified: trunk/Source/WTF/wtf/RetainPtr.h (287264 => 287265)


--- trunk/Source/WTF/wtf/RetainPtr.h	2021-12-20 17:45:19 UTC (rev 287264)
+++ trunk/Source/WTF/wtf/RetainPtr.h	2021-12-20 17:57:41 UTC (rev 287265)
@@ -100,7 +100,7 @@
 
     void clear();
     PtrType leakRef() WARN_UNUSED_RETURN;
-#if PLATFORM(COCOA)
+#if HAVE(CFAUTORELEASE)
     PtrType autorelease();
 #endif
 
@@ -206,7 +206,7 @@
     return fromStorageType(std::exchange(m_ptr, nullptr));
 }
 
-#if PLATFORM(COCOA)
+#if HAVE(CFAUTORELEASE)
 template<typename T> inline auto RetainPtr<T>::autorelease() -> PtrType
 {
 #ifdef __OBJC__
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to