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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 PersistentNode* m_prev; | 65 PersistentNode* m_prev; |
66 | 66 |
67 template<ThreadAffinity affinity, typename Owner> friend class PersistentBas e; | 67 template<ThreadAffinity affinity, typename Owner> friend class PersistentBas e; |
68 friend class PersistentAnchor; | 68 friend class PersistentAnchor; |
69 friend class ThreadState; | 69 friend class ThreadState; |
70 }; | 70 }; |
71 | 71 |
72 template<ThreadAffinity Affinity, typename Owner> | 72 template<ThreadAffinity Affinity, typename Owner> |
73 class PersistentBase : public PersistentNode { | 73 class PersistentBase : public PersistentNode { |
74 public: | 74 public: |
75 ~PersistentBase() | 75 ~PersistentBase() |
Mads Ager (chromium)
2014/01/14 07:26:43
Don't you want virtual here as well?
| |
76 { | 76 { |
77 #ifndef NDEBUG | 77 #ifndef NDEBUG |
78 m_threadState->checkThread(); | 78 m_threadState->checkThread(); |
79 #endif | 79 #endif |
80 m_next->m_prev = m_prev; | 80 m_next->m_prev = m_prev; |
81 m_prev->m_next = m_next; | 81 m_prev->m_next = m_next; |
82 } | 82 } |
83 | 83 |
84 protected: | 84 protected: |
85 inline PersistentBase() | 85 inline PersistentBase() |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 #endif | 128 #endif |
129 }; | 129 }; |
130 | 130 |
131 // A dummy Persistent handle that ensures the list of persistents is never null. | 131 // A dummy Persistent handle that ensures the list of persistents is never null. |
132 // This removes a test from a hot path. | 132 // This removes a test from a hot path. |
133 class PersistentAnchor : public PersistentNode { | 133 class PersistentAnchor : public PersistentNode { |
134 public: | 134 public: |
135 void trace(Visitor*) { } | 135 void trace(Visitor*) { } |
136 | 136 |
137 private: | 137 private: |
138 ~PersistentAnchor() { } | 138 virtual ~PersistentAnchor() { } |
139 PersistentAnchor() : PersistentNode(TraceMethodDelegate<PersistentAnchor, &P ersistentAnchor::trace>::trampoline) | 139 PersistentAnchor() : PersistentNode(TraceMethodDelegate<PersistentAnchor, &P ersistentAnchor::trace>::trampoline) |
140 { | 140 { |
141 m_next = this; | 141 m_next = this; |
142 m_prev = this; | 142 m_prev = this; |
143 } | 143 } |
144 | 144 |
145 friend class ThreadState; | 145 friend class ThreadState; |
146 }; | 146 }; |
147 | 147 |
148 // Persistent handles are used to store pointers into the | 148 // Persistent handles are used to store pointers into the |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
528 }; | 528 }; |
529 | 529 |
530 template<typename Key, typename Value, typename Extractor, typename Traits, type name KeyTraits> | 530 template<typename Key, typename Value, typename Extractor, typename Traits, type name KeyTraits> |
531 struct IsWeak<WebCore::HeapHashTableBacking<Key, Value, Extractor, Traits, KeyTr aits> > { | 531 struct IsWeak<WebCore::HeapHashTableBacking<Key, Value, Extractor, Traits, KeyTr aits> > { |
532 static const bool value = Traits::isWeak; | 532 static const bool value = Traits::isWeak; |
533 }; | 533 }; |
534 | 534 |
535 } // namespace WTF | 535 } // namespace WTF |
536 | 536 |
537 #endif | 537 #endif |
OLD | NEW |