Chromium Code Reviews| Index: Source/core/dom/NodeRareData.cpp |
| diff --git a/Source/core/dom/NodeRareData.cpp b/Source/core/dom/NodeRareData.cpp |
| index e3ee7e6d8a1190ad05ff54042d337417c73b0777..50cb2dd575c960e73b1c6ececa50ed5457005748 100644 |
| --- a/Source/core/dom/NodeRareData.cpp |
| +++ b/Source/core/dom/NodeRareData.cpp |
| @@ -31,11 +31,13 @@ |
| #include "config.h" |
| #include "core/dom/NodeRareData.h" |
| #include "core/dom/Element.h" |
| +#include "platform/heap/Handle.h" |
| namespace WebCore { |
| struct SameSizeAsNodeRareData { |
| - void* m_pointer[3]; |
| + void* m_pointer[2]; |
| + OwnPtrWillBePersistent<NodeMutationObserverData> m_mutationObserverData; |
| unsigned m_bitfields; |
| }; |
| @@ -55,6 +57,17 @@ void NodeListsNodeData::invalidateCaches(const QualifiedName* attrName) |
| it->value->invalidateCache(); |
| } |
| +void NodeRareData::dispose() |
| +{ |
| +#if ENABLE(OILPAN) |
|
haraken
2014/04/21 06:00:34
Ditto.
sof
2014/04/21 07:34:05
Hmm, is it feasible to dispose early in the non-Oi
sof
2014/04/21 12:45:16
..as we have identified all the places where we ha
|
| + if (m_mutationObserverData) { |
| + for (unsigned i = 0; i < m_mutationObserverData->registry.size(); i++) |
| + m_mutationObserverData->registry.at(i)->dispose(); |
| + m_mutationObserverData.clear(); |
| + } |
| +#endif |
| +} |
| + |
| // Ensure the 10 bits reserved for the m_connectedFrameCount cannot overflow |
| COMPILE_ASSERT(Page::maxNumberOfFrames < (1 << NodeRareData::ConnectedFrameCountBits), Frame_limit_should_fit_in_rare_data_count); |