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

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: Rebased. 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
« no previous file with comments | « 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 6d2f81ae2ee49d620aa8580d1bbf63cd243ac95c..bb1e189771d6eb879bc79136bc705dfb47664328 100644
--- a/Source/wtf/PassOwnPtr.h
+++ b/Source/wtf/PassOwnPtr.h
@@ -50,7 +50,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(U, T)) : m_ptr(o.leakPtr()) { }
~PassOwnPtr() { deleteOwnedPtr(m_ptr); }
« no previous file with comments | « Source/wtf/PassOwnArrayPtr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698