Index: third_party/WebKit/Source/wtf/HashMapTest.cpp |
diff --git a/third_party/WebKit/Source/wtf/HashMapTest.cpp b/third_party/WebKit/Source/wtf/HashMapTest.cpp |
index 540331424df431ccff4006a676cf86fb2eff1733..d12d81ef299922e0f566edb793b9174a266b4f5c 100644 |
--- a/third_party/WebKit/Source/wtf/HashMapTest.cpp |
+++ b/third_party/WebKit/Source/wtf/HashMapTest.cpp |
@@ -478,11 +478,19 @@ class CountCopy final { |
public: |
CountCopy() : m_counter(nullptr) { } |
explicit CountCopy(int& counter) : m_counter(&counter) { } |
- CountCopy(const CountCopy& other) : m_counter(other.m_counter) |
+ CountCopy(const CountCopy& other) |
+ : m_counter(other.m_counter) |
{ |
if (m_counter) |
++*m_counter; |
} |
+ CountCopy& operator=(const CountCopy& other) |
+ { |
+ m_counter = other.m_counter; |
+ if (m_counter) |
+ ++*m_counter; |
+ return *this; |
+ } |
private: |
int* m_counter; |