OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> | 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 return new NodeRareData(layoutObject); | 69 return new NodeRareData(layoutObject); |
70 } | 70 } |
71 | 71 |
72 void clearNodeLists() { m_nodeLists.clear(); } | 72 void clearNodeLists() { m_nodeLists.clear(); } |
73 NodeListsNodeData* nodeLists() const { return m_nodeLists.get(); } | 73 NodeListsNodeData* nodeLists() const { return m_nodeLists.get(); } |
74 // ensureNodeLists() and a following NodeListsNodeData functions must be | 74 // ensureNodeLists() and a following NodeListsNodeData functions must be |
75 // wrapped with a ThreadState::GCForbiddenScope in order to avoid an | 75 // wrapped with a ThreadState::GCForbiddenScope in order to avoid an |
76 // initialized m_nodeLists is cleared by NodeRareData::traceAfterDispatch(). | 76 // initialized m_nodeLists is cleared by NodeRareData::traceAfterDispatch(). |
77 NodeListsNodeData& ensureNodeLists() { | 77 NodeListsNodeData& ensureNodeLists() { |
78 DCHECK(ThreadState::current()->isGCForbidden()); | 78 DCHECK(ThreadState::current()->isGCForbidden()); |
79 if (!m_nodeLists) | 79 if (!m_nodeLists) { |
80 m_nodeLists = NodeListsNodeData::create(); | 80 m_nodeLists = NodeListsNodeData::create(); |
| 81 ScriptWrappableVisitor::writeBarrier(this, m_nodeLists); |
| 82 } |
81 return *m_nodeLists; | 83 return *m_nodeLists; |
82 } | 84 } |
83 | 85 |
84 NodeMutationObserverData* mutationObserverData() { | 86 NodeMutationObserverData* mutationObserverData() { |
85 return m_mutationObserverData.get(); | 87 return m_mutationObserverData.get(); |
86 } | 88 } |
87 NodeMutationObserverData& ensureMutationObserverData() { | 89 NodeMutationObserverData& ensureMutationObserverData() { |
88 if (!m_mutationObserverData) { | 90 if (!m_mutationObserverData) { |
89 m_mutationObserverData = NodeMutationObserverData::create(); | 91 m_mutationObserverData = NodeMutationObserverData::create(); |
90 ScriptWrappableVisitor::writeBarrier(this, m_mutationObserverData); | 92 ScriptWrappableVisitor::writeBarrier(this, m_mutationObserverData); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 unsigned m_elementFlags : NumberOfElementFlags; | 145 unsigned m_elementFlags : NumberOfElementFlags; |
144 unsigned m_restyleFlags : NumberOfDynamicRestyleFlags; | 146 unsigned m_restyleFlags : NumberOfDynamicRestyleFlags; |
145 | 147 |
146 protected: | 148 protected: |
147 unsigned m_isElementRareData : 1; | 149 unsigned m_isElementRareData : 1; |
148 }; | 150 }; |
149 | 151 |
150 } // namespace blink | 152 } // namespace blink |
151 | 153 |
152 #endif // NodeRareData_h | 154 #endif // NodeRareData_h |
OLD | NEW |