| 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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 // TODO(haraken): What we really want to check here is that the pointer | 785 // TODO(haraken): What we really want to check here is that the pointer |
| 786 // is a traceable object. In other words, the pointer is either of: | 786 // is a traceable object. In other words, the pointer is either of: |
| 787 // | 787 // |
| 788 // (a) a pointer to the head of an on-heap object. | 788 // (a) a pointer to the head of an on-heap object. |
| 789 // (b) a pointer to the head of an on-heap mixin object. | 789 // (b) a pointer to the head of an on-heap mixin object. |
| 790 // | 790 // |
| 791 // We can check it by calling Heap::isHeapObjectAlive(m_raw), | 791 // We can check it by calling Heap::isHeapObjectAlive(m_raw), |
| 792 // but we cannot call it here because it requres to include T.h. | 792 // but we cannot call it here because it requres to include T.h. |
| 793 // So we currently implement only the check for (a). | 793 // So we currently implement only the check for (a). |
| 794 if (!IsGarbageCollectedMixin<T>::value) | 794 if (!IsGarbageCollectedMixin<T>::value) |
| 795 HeapObjectHeader::fromPayload(m_raw)->checkHeader(); | 795 ASSERT(HeapObjectHeader::fromPayload(m_raw)->checkHeader()); |
| 796 #endif | 796 #endif |
| 797 } | 797 } |
| 798 | 798 |
| 799 T* m_raw; | 799 T* m_raw; |
| 800 | 800 |
| 801 template<bool x, WTF::WeakHandlingFlag y, WTF::ShouldWeakPointersBeMarkedStr
ongly z, typename U, typename V> friend struct CollectionBackingTraceTrait; | 801 template<bool x, WTF::WeakHandlingFlag y, WTF::ShouldWeakPointersBeMarkedStr
ongly z, typename U, typename V> friend struct CollectionBackingTraceTrait; |
| 802 friend class Visitor; | 802 friend class Visitor; |
| 803 | 803 |
| 804 }; | 804 }; |
| 805 | 805 |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { | 1287 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { |
| 1288 static_assert(sizeof(T), "T must be fully defined"); | 1288 static_assert(sizeof(T), "T must be fully defined"); |
| 1289 }; | 1289 }; |
| 1290 | 1290 |
| 1291 template<typename T> | 1291 template<typename T> |
| 1292 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1292 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
| 1293 | 1293 |
| 1294 } // namespace WTF | 1294 } // namespace WTF |
| 1295 | 1295 |
| 1296 #endif | 1296 #endif |
| OLD | NEW |