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

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: Created 7 years, 4 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
Index: Source/wtf/PassOwnPtr.h
diff --git a/Source/wtf/PassOwnPtr.h b/Source/wtf/PassOwnPtr.h
index c379f2fd3d6777b6be6f0202f08953e2e1faaf65..b1fdeb7dbf1039eeb8bec6142c6f5cdb44ed7792 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, EnsureOwnPtrConvertibleArgDecl) : m_ptr(o.leakPtr()) { }
~PassOwnPtr() { deleteOwnedPtr(m_ptr); }
« no previous file with comments | « Source/wtf/PassOwnArrayPtr.h ('k') | Source/wtf/PassRefPtr.h » ('j') | Source/wtf/PassRefPtr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698