Chromium Code Reviews| Index: Source/core/dom/NodeRareData.h |
| diff --git a/Source/core/dom/NodeRareData.h b/Source/core/dom/NodeRareData.h |
| index 9e8d139fc429999ded697e7fe333a6627fee6d2f..55d7869e3225ca4a6c53bf4c055dfd707cefa5a7 100644 |
| --- a/Source/core/dom/NodeRareData.h |
| +++ b/Source/core/dom/NodeRareData.h |
| @@ -232,16 +232,15 @@ private: |
| NodeMutationObserverData() { } |
| }; |
| -class NodeRareData : public NodeRareDataBase { |
| - WTF_MAKE_NONCOPYABLE(NodeRareData); WTF_MAKE_FAST_ALLOCATED; |
| +class NodeRareData : public NoBaseWillBeGarbageCollectedFinalized<NodeRareData>, public NodeRareDataBase { |
| + WTF_MAKE_NONCOPYABLE(NodeRareData); |
| + WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| public: |
| - static PassOwnPtr<NodeRareData> create(RenderObject* renderer) |
| + static RawPtr<NodeRareData> create(RenderObject* renderer) |
|
haraken
2014/05/07 02:10:26
This could be NodeRareData*.
|
| { |
| - return adoptPtr(new NodeRareData(renderer)); |
| + return new NodeRareData(renderer); |
| } |
| - void dispose(); |
| - |
| void clearNodeLists() { m_nodeLists.clear(); } |
| NodeListsNodeData* nodeLists() const { return m_nodeLists.get(); } |
| NodeListsNodeData& ensureNodeLists() |
| @@ -284,21 +283,29 @@ public: |
| ConnectedFrameCountBits = 10, // Must fit Page::maxNumberOfFrames. |
| }; |
| + void trace(Visitor*); |
| + |
| + void traceAfterDispatch(Visitor*); |
| + void finalizeGarbageCollectedObject(); |
| + |
| protected: |
| NodeRareData(RenderObject* renderer) |
| : NodeRareDataBase(renderer) |
| , m_connectedFrameCount(0) |
| , m_elementFlags(0) |
| , m_restyleFlags(0) |
| + , m_isElementRareData(false) |
| { } |
| private: |
| OwnPtr<NodeListsNodeData> m_nodeLists; |
| - OwnPtrWillBePersistent<NodeMutationObserverData> m_mutationObserverData; |
| + OwnPtrWillBeMember<NodeMutationObserverData> m_mutationObserverData; |
| unsigned m_connectedFrameCount : ConnectedFrameCountBits; |
| unsigned m_elementFlags : NumberOfElementFlags; |
| unsigned m_restyleFlags : NumberOfDynamicRestyleFlags; |
| +protected: |
| + unsigned m_isElementRareData : 1; |
| }; |
| inline bool NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList(Node& ownerNode) |