OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/heap/PersistentNode.h" | 5 #include "platform/heap/PersistentNode.h" |
6 | 6 |
7 #include "platform/heap/Handle.h" | 7 #include "platform/heap/Handle.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 108 matching lines...) Loading... |
119 ASSERT(persistent); | 119 ASSERT(persistent); |
120 void* rawObject = persistent->atomicGet(); | 120 void* rawObject = persistent->atomicGet(); |
121 if (!rawObject) | 121 if (!rawObject) |
122 continue; | 122 continue; |
123 BasePage* page = pageFromObject(rawObject); | 123 BasePage* page = pageFromObject(rawObject); |
124 ASSERT(page); | 124 ASSERT(page); |
125 // The main thread will upon detach just mark its heap pages as orph
aned, | 125 // The main thread will upon detach just mark its heap pages as orph
aned, |
126 // but not invalidate its CrossThreadPersistent<>s. | 126 // but not invalidate its CrossThreadPersistent<>s. |
127 if (page->orphaned()) | 127 if (page->orphaned()) |
128 continue; | 128 continue; |
129 if (page->arena()->threadState() == threadState) | 129 if (page->arena()->getThreadState() == threadState) |
130 persistent->clear(); | 130 persistent->clear(); |
131 } | 131 } |
132 slots = slots->m_next; | 132 slots = slots->m_next; |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 } // namespace blink | 136 } // namespace blink |
OLD | NEW |