| Index: third_party/WebKit/Source/core/style/DataPersistent.h
|
| diff --git a/third_party/WebKit/Source/core/style/DataPersistent.h b/third_party/WebKit/Source/core/style/DataPersistent.h
|
| index ba18789be6a04f8e81c69e41885bbf242d622922..5b5feae7bca364f3314aea4075aac9ee516147e3 100644
|
| --- a/third_party/WebKit/Source/core/style/DataPersistent.h
|
| +++ b/third_party/WebKit/Source/core/style/DataPersistent.h
|
| @@ -46,6 +46,11 @@ class DataPersistent {
|
| const_cast<DataPersistent&>(other).own_copy_ = false;
|
| }
|
|
|
| + DataPersistent(DataPersistent&& other)
|
| + : data_(std::move(other.data_)), own_copy_(other.own_copy_) {
|
| + other.own_copy_ = false;
|
| + }
|
| +
|
| const T* Get() const { return data_ ? data_->Get() : nullptr; }
|
|
|
| const T& operator*() const { return data_ ? *Get() : nullptr; }
|
| @@ -78,6 +83,12 @@ class DataPersistent {
|
| }
|
|
|
| void operator=(std::nullptr_t) { data_.clear(); }
|
| + DataPersistent& operator=(DataPersistent&& other) {
|
| + data_ = std::move(other.data_);
|
| + own_copy_ = other.own_copy_;
|
| + other.own_copy_ = false;
|
| + return *this;
|
| + }
|
|
|
| private:
|
| // Reduce size of DataPersistent<> by delaying creation of Persistent<>.
|
|
|