| Index: third_party/WebKit/Source/wtf/PassOwnPtr.h
|
| diff --git a/third_party/WebKit/Source/wtf/PassOwnPtr.h b/third_party/WebKit/Source/wtf/PassOwnPtr.h
|
| index 131cb381798fbc7a3498bdcbf64db7bf16be3618..51d93cce86fbe51c5750d18a660455c17cf758c1 100644
|
| --- a/third_party/WebKit/Source/wtf/PassOwnPtr.h
|
| +++ b/third_party/WebKit/Source/wtf/PassOwnPtr.h
|
| @@ -51,8 +51,8 @@ public:
|
| // 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>&, EnsurePtrConvertibleArgDecl(U, T));
|
| + PassOwnPtr(PassOwnPtr&& o) : m_ptr(o.leakPtr()) {}
|
| + template <typename U> PassOwnPtr(PassOwnPtr<U>&&, EnsurePtrConvertibleArgDecl(U, T));
|
|
|
| ~PassOwnPtr() { OwnedPtrDeleter<T>::deletePtr(m_ptr); }
|
|
|
| @@ -73,6 +73,7 @@ public:
|
| private:
|
| explicit PassOwnPtr(PtrType ptr) : m_ptr(ptr) {}
|
|
|
| + PassOwnPtr(const PassOwnPtr&) = delete;
|
| PassOwnPtr& operator=(const PassOwnPtr&) = delete;
|
|
|
| // We should never have two OwnPtrs for the same underlying object
|
| @@ -87,7 +88,7 @@ private:
|
| };
|
|
|
| template <typename T>
|
| -template <typename U> inline PassOwnPtr<T>::PassOwnPtr(const PassOwnPtr<U>& o, EnsurePtrConvertibleArgDefn(U, T))
|
| +template <typename U> inline PassOwnPtr<T>::PassOwnPtr(PassOwnPtr<U>&& o, EnsurePtrConvertibleArgDefn(U, T))
|
| : m_ptr(o.leakPtr())
|
| {
|
| static_assert(!std::is_array<T>::value, "pointers to array must never be converted");
|
| @@ -130,7 +131,7 @@ template <typename T> inline PassOwnPtr<T[]> adoptArrayPtr(T* ptr)
|
| return PassOwnPtr<T[]>(ptr);
|
| }
|
|
|
| -template <typename T, typename U> inline PassOwnPtr<T> static_pointer_cast(const PassOwnPtr<U>& p)
|
| +template <typename T, typename U> inline PassOwnPtr<T> static_pointer_cast(PassOwnPtr<U>&& p)
|
| {
|
| static_assert(!std::is_array<T>::value, "pointers to array must never be converted");
|
| return adoptPtr(static_cast<T*>(p.leakPtr()));
|
|
|