OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 | 726 |
727 WeakMember& operator=(std::nullptr_t) | 727 WeakMember& operator=(std::nullptr_t) |
728 { | 728 { |
729 this->m_raw = nullptr; | 729 this->m_raw = nullptr; |
730 return *this; | 730 return *this; |
731 } | 731 } |
732 | 732 |
733 private: | 733 private: |
734 T** cell() const { return const_cast<T**>(&this->m_raw); } | 734 T** cell() const { return const_cast<T**>(&this->m_raw); } |
735 | 735 |
736 friend class Visitor; | |
737 template<typename Derived> friend class VisitorHelper; | 736 template<typename Derived> friend class VisitorHelper; |
738 }; | 737 }; |
739 | 738 |
740 // Comparison operators between (Weak)Members and Persistents | 739 // Comparison operators between (Weak)Members and Persistents |
741 template<typename T, typename U> inline bool operator==(const Member<T>& a, cons
t Member<U>& b) { return a.get() == b.get(); } | 740 template<typename T, typename U> inline bool operator==(const Member<T>& a, cons
t Member<U>& b) { return a.get() == b.get(); } |
742 template<typename T, typename U> inline bool operator!=(const Member<T>& a, cons
t Member<U>& b) { return a.get() != b.get(); } | 741 template<typename T, typename U> inline bool operator!=(const Member<T>& a, cons
t Member<U>& b) { return a.get() != b.get(); } |
743 template<typename T, typename U> inline bool operator==(const Member<T>& a, cons
t Persistent<U>& b) { return a.get() == b.get(); } | 742 template<typename T, typename U> inline bool operator==(const Member<T>& a, cons
t Persistent<U>& b) { return a.get() == b.get(); } |
744 template<typename T, typename U> inline bool operator!=(const Member<T>& a, cons
t Persistent<U>& b) { return a.get() != b.get(); } | 743 template<typename T, typename U> inline bool operator!=(const Member<T>& a, cons
t Persistent<U>& b) { return a.get() != b.get(); } |
745 template<typename T, typename U> inline bool operator==(const Persistent<T>& a,
const Member<U>& b) { return a.get() == b.get(); } | 744 template<typename T, typename U> inline bool operator==(const Persistent<T>& a,
const Member<U>& b) { return a.get() == b.get(); } |
746 template<typename T, typename U> inline bool operator!=(const Persistent<T>& a,
const Member<U>& b) { return a.get() != b.get(); } | 745 template<typename T, typename U> inline bool operator!=(const Persistent<T>& a,
const Member<U>& b) { return a.get() != b.get(); } |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 template<typename T> | 1188 template<typename T> |
1190 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { | 1189 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { |
1191 }; | 1190 }; |
1192 | 1191 |
1193 template<typename T> | 1192 template<typename T> |
1194 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1193 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
1195 | 1194 |
1196 } // namespace WTF | 1195 } // namespace WTF |
1197 | 1196 |
1198 #endif | 1197 #endif |
OLD | NEW |