| Index: Source/core/css/CSSValue.h
|
| diff --git a/Source/core/css/CSSValue.h b/Source/core/css/CSSValue.h
|
| index 8e8ec00fd043e8a2beaafbaab338c7392da5f8ae..2bf16b0b796dcc308f43083327a4cc1bdf9af0fd 100644
|
| --- a/Source/core/css/CSSValue.h
|
| +++ b/Source/core/css/CSSValue.h
|
| @@ -80,7 +80,10 @@ public:
|
|
|
| ~CSSValue()
|
| {
|
| - deref();
|
| + // Although m_data can't be null, a move constructor from NullableCSSValue
|
| + // could make it null for a short time.
|
| + if (m_data)
|
| + deref();
|
| }
|
|
|
| CSSValue& operator=(const CSSValue& rhs)
|
| @@ -91,6 +94,18 @@ public:
|
| return *this;
|
| }
|
|
|
| + CSSValue& operator=(CSSValue&& rhs)
|
| + {
|
| + m_data = rhs.m_data;
|
| + rhs.m_data.clear();
|
| + return *this;
|
| + }
|
| +
|
| + CSSValue(CSSValue&& rhs)
|
| + {
|
| + m_data = rhs.m_data;
|
| + }
|
| +
|
| bool operator==(const CSSValue& other) const
|
| {
|
| if (m_data == other.m_data)
|
| @@ -269,6 +284,12 @@ public:
|
| return m_data;
|
| }
|
|
|
| + NullableCSSValue(NullableCSSValue&& rhs)
|
| + {
|
| + m_data = rhs.m_data;
|
| + rhs.m_data = nullptr;
|
| + }
|
| +
|
| NullableCSSValue& operator=(const NullableCSSValue& rhs)
|
| {
|
| rhs.ref();
|
| @@ -277,6 +298,13 @@ public:
|
| return *this;
|
| }
|
|
|
| + NullableCSSValue& operator=(NullableCSSValue&& rhs)
|
| + {
|
| + m_data = rhs.m_data;
|
| + rhs.m_data.clear();
|
| + return *this;
|
| + }
|
| +
|
| bool operator==(const NullableCSSValue& rhs) const
|
| {
|
| if (m_data == rhs.m_data)
|
|
|