| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 { | 163 { |
| 164 #if ENABLE(ASSERT) | 164 #if ENABLE(ASSERT) |
| 165 m_threadId = currentThread(); | 165 m_threadId = currentThread(); |
| 166 #endif | 166 #endif |
| 167 } | 167 } |
| 168 | 168 |
| 169 // We have a trace method in the SupplementableBase class to ensure we have | 169 // We have a trace method in the SupplementableBase class to ensure we have |
| 170 // the vtable at the first word of the object. However we don't trace the | 170 // the vtable at the first word of the object. However we don't trace the |
| 171 // m_supplements here, but in the partially specialized template subclasses | 171 // m_supplements here, but in the partially specialized template subclasses |
| 172 // since we only want to trace it for garbage collected classes. | 172 // since we only want to trace it for garbage collected classes. |
| 173 virtual void trace(Visitor*) { } | |
| 174 | 173 |
| 175 // FIXME: Oilpan: Make private and remove this ignore once PersistentHeapSup
plementable is removed again. | 174 // FIXME: Oilpan: Make private and remove this ignore once PersistentHeapSup
plementable is removed again. |
| 176 protected: | 175 protected: |
| 177 typename SupplementableTraits<T, isGarbageCollected>::SupplementMap m_supple
ments; | 176 typename SupplementableTraits<T, isGarbageCollected>::SupplementMap m_supple
ments; |
| 178 | 177 |
| 179 #if ENABLE(ASSERT) | 178 #if ENABLE(ASSERT) |
| 180 protected: | 179 protected: |
| 181 SupplementableBase() : m_threadId(currentThread()) { } | 180 SupplementableBase() : m_threadId(currentThread()) { } |
| 182 | 181 |
| 183 private: | 182 private: |
| 184 ThreadIdentifier m_threadId; | 183 ThreadIdentifier m_threadId; |
| 185 #endif | 184 #endif |
| 186 }; | 185 }; |
| 187 | 186 |
| 188 | 187 |
| 189 template<typename T> | 188 template<typename T> |
| 190 class Supplement : public SupplementBase<T, false> { }; | 189 class Supplement : public SupplementBase<T, false> { }; |
| 191 | 190 |
| 192 // This class is used to make an off-heap class supplementable with off-heap | 191 // This class is used to make an off-heap class supplementable with off-heap |
| 193 // supplements (Supplement). | 192 // supplements (Supplement). |
| 194 template<typename T> | 193 template<typename T> |
| 195 class Supplementable : public SupplementableBase<T, false> { | 194 class Supplementable : public SupplementableBase<T, false> { |
| 196 }; | 195 }; |
| 197 | 196 |
| 198 } // namespace blink | 197 } // namespace blink |
| 199 | 198 |
| 200 #endif // Supplementable_h | 199 #endif // Supplementable_h |
| OLD | NEW |