Title: [149373] trunk/Source/WTF
- Revision
- 149373
- Author
- [email protected]
- Date
- 2013-04-30 09:51:52 -0700 (Tue, 30 Apr 2013)
Log Message
[Mac] Make adoptNS faster on platforms without garbage collection by skipping a CFRetain/NSRelease pair
https://bugs.webkit.org/show_bug.cgi?id=115424
Reviewed by Eric Carlson.
* wtf/RetainPtr.h:
(WTF::adoptNSReference): When OBJC_NO_GC is set, make this an empty function, because in that case
CFRetain and -[NSObject retain] are the same thing and there is no need to call CFRetain and
-[NSObject release] to adopt an Objective-C object.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (149372 => 149373)
--- trunk/Source/WTF/ChangeLog 2013-04-30 16:31:22 UTC (rev 149372)
+++ trunk/Source/WTF/ChangeLog 2013-04-30 16:51:52 UTC (rev 149373)
@@ -1,3 +1,15 @@
+2013-04-30 Darin Adler <[email protected]>
+
+ [Mac] Make adoptNS faster on platforms without garbage collection by skipping a CFRetain/NSRelease pair
+ https://bugs.webkit.org/show_bug.cgi?id=115424
+
+ Reviewed by Eric Carlson.
+
+ * wtf/RetainPtr.h:
+ (WTF::adoptNSReference): When OBJC_NO_GC is set, make this an empty function, because in that case
+ CFRetain and -[NSObject retain] are the same thing and there is no need to call CFRetain and
+ -[NSObject release] to adopt an Objective-C object.
+
2013-04-30 Anders Carlsson <[email protected]>
String::isolatedCopy() can avoid a copy if the original is a temporary
Modified: trunk/Source/WTF/wtf/RetainPtr.h (149372 => 149373)
--- trunk/Source/WTF/wtf/RetainPtr.h 2013-04-30 16:31:22 UTC (rev 149372)
+++ trunk/Source/WTF/wtf/RetainPtr.h 2013-04-30 16:51:52 UTC (rev 149373)
@@ -51,6 +51,11 @@
enum AdoptNSTag { AdoptNS };
#ifdef __OBJC__
+#ifdef OBJC_NO_GC
+ inline void adoptNSReference(id)
+ {
+ }
+#else
inline void adoptNSReference(id ptr)
{
if (ptr) {
@@ -59,6 +64,7 @@
}
}
#endif
+#endif
template<typename T> class RetainPtr {
public:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes