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

Unified Diff: third_party/WebKit/Source/wtf/PassRefPtr.h

Issue 2437883002: Made PassRefPtr move only and replaced new copies with moves. (Closed)
Patch Set: Removed stale comment Created 4 years, 2 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/modules/fetch/FormDataBytesConsumer.cpp ('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/wtf/PassRefPtr.h
diff --git a/third_party/WebKit/Source/wtf/PassRefPtr.h b/third_party/WebKit/Source/wtf/PassRefPtr.h
index 5bf92abc3633dc551e4138382fa6c1296122856e..af7a292005b33eb50b372ebc327156d5221e3ee6 100644
--- a/third_party/WebKit/Source/wtf/PassRefPtr.h
+++ b/third_party/WebKit/Source/wtf/PassRefPtr.h
@@ -71,11 +71,6 @@ class PassRefPtr {
PassRefPtr() : m_ptr(nullptr) {}
PassRefPtr(std::nullptr_t) : m_ptr(nullptr) {}
PassRefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
- // It somewhat breaks the type system to allow transfer of ownership out of
- // a const PassRefPtr. However, it makes it much easier to work with
- // PassRefPtr temporaries, and we don't have a need to use real const
- // PassRefPtrs anyway.
- PassRefPtr(const PassRefPtr& o) : m_ptr(o.leakRef()) {}
PassRefPtr(PassRefPtr&& o) : m_ptr(o.leakRef()) {}
template <typename U>
PassRefPtr(const PassRefPtr<U>& o, EnsurePtrConvertibleArgDecl(U, T))
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698