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

Unified Diff: Source/wtf/PassOwnArrayPtr.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/OwnPtr.h ('k') | Source/wtf/PassOwnPtr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/PassOwnArrayPtr.h
diff --git a/Source/wtf/PassOwnArrayPtr.h b/Source/wtf/PassOwnArrayPtr.h
index 724dba3bf41e4a4dffd17e97d54560ac9a6d92d1..124fdb43f424d18cbaa774b8311d51ca132dd1e4 100644
--- a/Source/wtf/PassOwnArrayPtr.h
+++ b/Source/wtf/PassOwnArrayPtr.h
@@ -49,7 +49,7 @@ public:
// a const PassOwnArrayPtr. However, it makes it much easier to work with PassOwnArrayPtr
// temporaries, and we don't have a need to use real const PassOwnArrayPtrs anyway.
PassOwnArrayPtr(const PassOwnArrayPtr& o) : m_ptr(o.leakPtr()) { }
- template<typename U> PassOwnArrayPtr(const PassOwnArrayPtr<U>& o) : m_ptr(o.leakPtr()) { }
+ template<typename U> PassOwnArrayPtr(const PassOwnArrayPtr<U>& o, EnsurePtrConvertibleArgDecl(U, T)) : m_ptr(o.leakPtr()) { }
~PassOwnArrayPtr() { deleteOwnedArrayPtr(m_ptr); }
« no previous file with comments | « Source/wtf/OwnPtr.h ('k') | Source/wtf/PassOwnPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698