[webkit-reviews] review denied: [Bug 115033] Add move semantics to RefPtr : [Attachment 199233] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 23 07:45:42 PDT 2013
Anders Carlsson <andersca at apple.com> has denied Mikhail Pozdnyakov
<mikhail.pozdnyakov at intel.com>'s request for review:
Bug 115033: Add move semantics to RefPtr
https://bugs.webkit.org/show_bug.cgi?id=115033
Attachment 199233: patch
https://bugs.webkit.org/attachment.cgi?id=199233&action=review
------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=199233&action=review
This is great, but I'd appreciate if you could upload a new patch so we can let
the EWS bots chew at it - it's a pretty fundamental change and it could break
the build in weird wais.
> Source/WTF/wtf/RefPtr.h:47
> + ALWAYS_INLINE RefPtr(RefPtr&& o) : m_ptr(o.get()) { o.m_ptr = 0; }
I think this would read better as
RefPtr(RefPtr&& o) : m_ptr(o.release().leakRef()) { }
> Source/WTF/wtf/RefPtr.h:48
> + template<typename U> RefPtr(RefPtr<U>&& o) : m_ptr(o.get()) {
o.m_ptr = 0; }
Same thing here.
> Source/WTF/wtf/RefPtr.h:163
> + if (m_ptr != o.get()) {
> + derefIfNotNull(m_ptr);
> + m_ptr = o.get();
> + o.m_ptr = 0;
> + }
> + return *this;
I think this could just be m_ptr = o.release();
> Source/WTF/wtf/RefPtr.h:172
> + if (m_ptr != o.get()) {
> + derefIfNotNull(m_ptr);
> + m_ptr = o.get();
> + o.m_ptr = 0;
> + }
Ditto.
More information about the webkit-reviews
mailing list