Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Unified Diff: third_party/WebKit/Source/platform/wtf/RefPtr.h

Issue 2852893002: Made RefPtr constructor only accept PassRefPtr rvalues. (Closed)
Patch Set: added move wrap Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/PODRedBlackTree.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/wtf/RefPtr.h
diff --git a/third_party/WebKit/Source/platform/wtf/RefPtr.h b/third_party/WebKit/Source/platform/wtf/RefPtr.h
index 8fd8887717e19a7de9218c80a78aeb2cb47cc6b8..aa369a0e0eeff3463abc7d69e9e52bae2b84063e 100644
--- a/third_party/WebKit/Source/platform/wtf/RefPtr.h
+++ b/third_party/WebKit/Source/platform/wtf/RefPtr.h
@@ -56,7 +56,7 @@ class RefPtr {
// See comments in PassRefPtr.h for an explanation of why this takes a const
// reference.
template <typename U>
- RefPtr(const PassRefPtr<U>&, EnsurePtrConvertibleArgDecl(U, T));
+ RefPtr(PassRefPtr<U>&&, EnsurePtrConvertibleArgDecl(U, T));
// Hash table deleted values, which are only constructed and never copied or
// destroyed.
@@ -104,8 +104,7 @@ class RefPtr {
template <typename T>
template <typename U>
-inline RefPtr<T>::RefPtr(const PassRefPtr<U>& o,
- EnsurePtrConvertibleArgDefn(U, T))
+inline RefPtr<T>::RefPtr(PassRefPtr<U>&& o, EnsurePtrConvertibleArgDefn(U, T))
: ptr_(o.LeakRef()) {}
template <typename T>
« no previous file with comments | « third_party/WebKit/Source/platform/PODRedBlackTree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698