Title: [132689] trunk/Source/WTF
- Revision
- 132689
- Author
- [email protected]
- Date
- 2012-10-26 13:36:40 -0700 (Fri, 26 Oct 2012)
Log Message
Add an operator& to RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=100549
Reviewed by Dan Bernstein.
This is useful for APIs that return references using out parameters.
* wtf/RetainPtr.h:
(WTF::RetainPtr::operator&):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (132688 => 132689)
--- trunk/Source/WTF/ChangeLog 2012-10-26 20:12:25 UTC (rev 132688)
+++ trunk/Source/WTF/ChangeLog 2012-10-26 20:36:40 UTC (rev 132689)
@@ -1,3 +1,15 @@
+2012-10-26 Anders Carlsson <[email protected]>
+
+ Add an operator& to RetainPtr
+ https://bugs.webkit.org/show_bug.cgi?id=100549
+
+ Reviewed by Dan Bernstein.
+
+ This is useful for APIs that return references using out parameters.
+
+ * wtf/RetainPtr.h:
+ (WTF::RetainPtr::operator&):
+
2012-10-26 Gabor Ballabas <[email protected]>
[Qt] Enable JSC's disassembler on x86, x86_64 Linux
Modified: trunk/Source/WTF/wtf/RetainPtr.h (132688 => 132689)
--- trunk/Source/WTF/wtf/RetainPtr.h 2012-10-26 20:12:25 UTC (rev 132688)
+++ trunk/Source/WTF/wtf/RetainPtr.h 2012-10-26 20:36:40 UTC (rev 132689)
@@ -82,6 +82,8 @@
PtrType get() const { return m_ptr; }
PtrType operator->() const { return m_ptr; }
+ PtrType* operator&() { ASSERT(!m_ptr); return &m_ptr; }
+
#if COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS)
explicit operator PtrType() const { return m_ptr; }
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes