Title: [287200] trunk/Source/WTF
- Revision
- 287200
- Author
- hironori.fu...@sony.com
- Date
- 2021-12-17 11:53:46 -0800 (Fri, 17 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 Alex Christensen and Darin Adler.
MSVC /std:c++20 option implicitly enables /permissive- option.
However, RetainPtr.h can't compile because 'CFAutorelease' is not
defined.
CFAutorelease isn't available in AppleWin's CoreFoundation and
WinCairo's OpenCFLite as of now.
* wtf/RetainPtr.h: Enclosed RetainPtr<T>::autorelease with #if !OS(WINDOWS).
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (287199 => 287200)
--- trunk/Source/WTF/ChangeLog 2021-12-17 19:44:58 UTC (rev 287199)
+++ trunk/Source/WTF/ChangeLog 2021-12-17 19:53:46 UTC (rev 287200)
@@ -1,3 +1,19 @@
+2021-12-17 Fujii Hironori <hironori.fu...@sony.com>
+
+ 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 Alex Christensen and Darin Adler.
+
+ MSVC /std:c++20 option implicitly enables /permissive- option.
+ However, RetainPtr.h can't compile because 'CFAutorelease' is not
+ defined.
+
+ CFAutorelease isn't available in AppleWin's CoreFoundation and
+ WinCairo's OpenCFLite as of now.
+
+ * wtf/RetainPtr.h: Enclosed RetainPtr<T>::autorelease with #if !OS(WINDOWS).
+
2021-12-16 Alex Christensen <achristen...@webkit.org>
Unreviewed, reverting r287056.
Modified: trunk/Source/WTF/wtf/RetainPtr.h (287199 => 287200)
--- trunk/Source/WTF/wtf/RetainPtr.h 2021-12-17 19:44:58 UTC (rev 287199)
+++ trunk/Source/WTF/wtf/RetainPtr.h 2021-12-17 19:53:46 UTC (rev 287200)
@@ -100,7 +100,9 @@
void clear();
PtrType leakRef() WARN_UNUSED_RETURN;
+#if PLATFORM(COCOA)
PtrType autorelease();
+#endif
#ifdef __OBJC__
id bridgingAutorelease();
@@ -204,6 +206,7 @@
return fromStorageType(std::exchange(m_ptr, nullptr));
}
+#if PLATFORM(COCOA)
template<typename T> inline auto RetainPtr<T>::autorelease() -> PtrType
{
#ifdef __OBJC__
@@ -214,6 +217,7 @@
CFAutorelease(m_ptr);
return leakRef();
}
+#endif // PLATFORM(COCOA)
#ifdef __OBJC__
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes