| Index: third_party/WebKit/public/platform/WebPrivatePtr.h
|
| diff --git a/third_party/WebKit/public/platform/WebPrivatePtr.h b/third_party/WebKit/public/platform/WebPrivatePtr.h
|
| index 1349d00c82d7d4890d4d3a0a6c859a35c6a22598..62399d759bb1d80b47e4666610be1eca63edfed8 100644
|
| --- a/third_party/WebKit/public/platform/WebPrivatePtr.h
|
| +++ b/third_party/WebKit/public/platform/WebPrivatePtr.h
|
| @@ -97,7 +97,7 @@ class PtrStorageImpl<T,
|
| public:
|
| typedef PassRefPtr<T> BlinkPtrType;
|
|
|
| - void Assign(const BlinkPtrType& val) {
|
| + void Assign(BlinkPtrType&& val) {
|
| static_assert(
|
| crossThreadDestruction == kWebPrivatePtrDestructionSameThread ||
|
| WTF::IsSubclassOfTemplate<T, WTF::ThreadSafeRefCounted>::value,
|
| @@ -285,8 +285,8 @@ class WebPrivatePtr {
|
|
|
| #if INSIDE_BLINK
|
| template <typename U>
|
| - WebPrivatePtr(const U& ptr) : storage_(0) {
|
| - Storage().Assign(ptr);
|
| + WebPrivatePtr(U&& ptr) : storage_(0) {
|
| + Storage().Assign(std::forward<U>(ptr));
|
| }
|
|
|
| void Reset() { Storage().Release(); }
|
| @@ -297,8 +297,8 @@ class WebPrivatePtr {
|
| }
|
|
|
| template <typename U>
|
| - WebPrivatePtr& operator=(const U& ptr) {
|
| - Storage().Assign(ptr);
|
| + WebPrivatePtr& operator=(U&& ptr) {
|
| + Storage().Assign(std::forward<U>(ptr));
|
| return *this;
|
| }
|
|
|
|
|