| Index: third_party/WebKit/Source/wtf/RefPtr.h
|
| diff --git a/third_party/WebKit/Source/wtf/RefPtr.h b/third_party/WebKit/Source/wtf/RefPtr.h
|
| index 1660f882f8b321cf8ee9605558c5af12319ffe17..4ed3ea5de07c16ca00103e0044387d07421dbaef 100644
|
| --- a/third_party/WebKit/Source/wtf/RefPtr.h
|
| +++ b/third_party/WebKit/Source/wtf/RefPtr.h
|
| @@ -70,7 +70,11 @@
|
| ALWAYS_INLINE T* operator->() const { return m_ptr; }
|
|
|
| bool operator!() const { return !m_ptr; }
|
| - explicit operator bool() const { return m_ptr; }
|
| +
|
| + // This conversion operator allows implicit conversion to bool but not to
|
| + // other integer types.
|
| + typedef T* (RefPtr::*UnspecifiedBoolType);
|
| + operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : 0; }
|
|
|
| RefPtr& operator=(RefPtr o) { swap(o); return *this; }
|
| RefPtr& operator=(std::nullptr_t) { clear(); return *this; }
|
| @@ -131,16 +135,6 @@
|
| return a == b.get();
|
| }
|
|
|
| -template <typename T> inline bool operator==(const RefPtr<T>& a, std::nullptr_t)
|
| -{
|
| - return !a.get();
|
| -}
|
| -
|
| -template <typename T> inline bool operator==(std::nullptr_t, const RefPtr<T>& b)
|
| -{
|
| - return !b.get();
|
| -}
|
| -
|
| template <typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const RefPtr<U>& b)
|
| {
|
| return a.get() != b.get();
|
| @@ -154,16 +148,6 @@
|
| template <typename T, typename U> inline bool operator!=(T* a, const RefPtr<U>& b)
|
| {
|
| return a != b.get();
|
| -}
|
| -
|
| -template <typename T> inline bool operator!=(const RefPtr<T>& a, std::nullptr_t)
|
| -{
|
| - return a.get();
|
| -}
|
| -
|
| -template <typename T> inline bool operator!=(std::nullptr_t, const RefPtr<T>& b)
|
| -{
|
| - return b.get();
|
| }
|
|
|
| template <typename T, typename U> inline RefPtr<T> static_pointer_cast(const RefPtr<U>& p)
|
|
|