| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 return this->m_supplements.get(key); | 177 return this->m_supplements.get(key); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void reattachThread() | 180 void reattachThread() |
| 181 { | 181 { |
| 182 #if !ASSERT_DISABLED | 182 #if !ASSERT_DISABLED |
| 183 m_threadId = currentThread(); | 183 m_threadId = currentThread(); |
| 184 #endif | 184 #endif |
| 185 } | 185 } |
| 186 | 186 |
| 187 void trace(Visitor* visitor) { visitor->trace(m_supplements); } | 187 virtual void trace(Visitor* visitor) { visitor->trace(m_supplements); } |
| 188 | 188 |
| 189 private: | 189 private: |
| 190 typename SupplementableTraits<T, isGarbageCollected>::SupplementMap m_supple
ments; | 190 typename SupplementableTraits<T, isGarbageCollected>::SupplementMap m_supple
ments; |
| 191 | 191 |
| 192 #if !ASSERT_DISABLED | 192 #if !ASSERT_DISABLED |
| 193 protected: | 193 protected: |
| 194 SupplementableBase() : m_threadId(currentThread()) { } | 194 SupplementableBase() : m_threadId(currentThread()) { } |
| 195 | 195 |
| 196 private: | 196 private: |
| 197 ThreadIdentifier m_threadId; | 197 ThreadIdentifier m_threadId; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 template<typename T> | 218 template<typename T> |
| 219 struct ThreadingTrait<WebCore::SupplementableBase<T, true> > { | 219 struct ThreadingTrait<WebCore::SupplementableBase<T, true> > { |
| 220 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; | 220 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; |
| 221 }; | 221 }; |
| 222 | 222 |
| 223 } // namespace WebCore | 223 } // namespace WebCore |
| 224 | 224 |
| 225 #endif // Supplementable_h | 225 #endif // Supplementable_h |
| OLD | NEW |