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

Unified Diff: Source/wtf/PassOwnPtr.h

Issue 23531003: Type check when upcasting PassOwnPtr/PassOwnArrayPtr to avoid possible function call ambiguousness (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No new macros introduced. Only ones from TypeTraits.h are used. Created 7 years, 3 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
« Source/wtf/OwnPtr.h ('K') | « Source/wtf/PassOwnArrayPtr.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/PassOwnPtr.h
diff --git a/Source/wtf/PassOwnPtr.h b/Source/wtf/PassOwnPtr.h
index c379f2fd3d6777b6be6f0202f08953e2e1faaf65..3e2913ef5655e502b8476d395909e5f7c5936696 100644
--- a/Source/wtf/PassOwnPtr.h
+++ b/Source/wtf/PassOwnPtr.h
@@ -52,7 +52,7 @@ namespace WTF {
// a const PassOwnPtr. However, it makes it much easier to work with PassOwnPtr
// temporaries, and we don't have a need to use real const PassOwnPtrs anyway.
PassOwnPtr(const PassOwnPtr& o) : m_ptr(o.leakPtr()) { }
- template<typename U> PassOwnPtr(const PassOwnPtr<U>& o) : m_ptr(o.leakPtr()) { }
+ template<typename U> PassOwnPtr(const PassOwnPtr<U>& o, EnsurePtrConvertibleArgDecl(typename RemovePointer<U>::Type, ValueType)) : m_ptr(o.leakPtr()) { }
~PassOwnPtr() { deleteOwnedPtr(m_ptr); }
« Source/wtf/OwnPtr.h ('K') | « Source/wtf/PassOwnArrayPtr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698