Title: [157402] trunk/Source/WTF
- Revision
- 157402
- Author
- [email protected]
- Date
- 2013-10-14 08:46:38 -0700 (Mon, 14 Oct 2013)
Log Message
Static assertions in WTF::adoptPtr should point to using adoptRef for ref-counted objects
https://bugs.webkit.org/show_bug.cgi?id=122745
Reviewed by Anders Carlsson.
* wtf/PassOwnPtr.h:
(WTF::adoptPtr): When the object's type is convertible to the RefCountedBase or ThreadSafeRefCountedBase type,
the static assertion should note that adoptRef should be used instead.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (157401 => 157402)
--- trunk/Source/WTF/ChangeLog 2013-10-14 15:45:35 UTC (rev 157401)
+++ trunk/Source/WTF/ChangeLog 2013-10-14 15:46:38 UTC (rev 157402)
@@ -1,3 +1,14 @@
+2013-10-14 Zan Dobersek <[email protected]>
+
+ Static assertions in WTF::adoptPtr should point to using adoptRef for ref-counted objects
+ https://bugs.webkit.org/show_bug.cgi?id=122745
+
+ Reviewed by Anders Carlsson.
+
+ * wtf/PassOwnPtr.h:
+ (WTF::adoptPtr): When the object's type is convertible to the RefCountedBase or ThreadSafeRefCountedBase type,
+ the static assertion should note that adoptRef should be used instead.
+
2013-10-14 Anders Carlsson <[email protected]>
WebKit Nightlies broken by r157374
Modified: trunk/Source/WTF/wtf/PassOwnPtr.h (157401 => 157402)
--- trunk/Source/WTF/wtf/PassOwnPtr.h 2013-10-14 15:45:35 UTC (rev 157401)
+++ trunk/Source/WTF/wtf/PassOwnPtr.h 2013-10-14 15:46:38 UTC (rev 157402)
@@ -145,8 +145,8 @@
template<typename T> inline PassOwnPtr<T> adoptPtr(T* ptr)
{
- static_assert(!std::is_convertible<T*, RefCountedBase*>::value, "Do not use adoptPtr with RefCounted, use adoptPtr!");
- static_assert(!std::is_convertible<T*, ThreadSafeRefCountedBase*>::value, "Do not use adoptPtr with ThreadSafeRefCounted, use adoptPtr!");
+ static_assert(!std::is_convertible<T*, RefCountedBase*>::value, "Do not use adoptPtr with RefCounted, use adoptRef!");
+ static_assert(!std::is_convertible<T*, ThreadSafeRefCountedBase*>::value, "Do not use adoptPtr with ThreadSafeRefCounted, use adoptRef!");
return PassOwnPtr<T>(ptr);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes