OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 it->value->invalidateCacheForAttribute(attrName); | 51 it->value->invalidateCacheForAttribute(attrName); |
52 | 52 |
53 if (attrName) | 53 if (attrName) |
54 return; | 54 return; |
55 | 55 |
56 TagCollectionCacheNS::iterator tagCacheEnd = m_tagCollectionCacheNS.end(); | 56 TagCollectionCacheNS::iterator tagCacheEnd = m_tagCollectionCacheNS.end(); |
57 for (TagCollectionCacheNS::iterator it = m_tagCollectionCacheNS.begin(); it != tagCacheEnd; ++it) | 57 for (TagCollectionCacheNS::iterator it = m_tagCollectionCacheNS.begin(); it != tagCacheEnd; ++it) |
58 it->value->invalidateCache(); | 58 it->value->invalidateCache(); |
59 } | 59 } |
60 | 60 |
61 #if ENABLE(OILPAN) | |
62 void NodeListsNodeData::clearWeakMembers(Visitor* visitor) | |
63 { | |
64 if (m_owner && (m_childNodeList ? 1 : 0) + m_atomicNameCaches.size() + m_tag CollectionCacheNS.size() == 0) { | |
Mads Ager (chromium)
2014/05/20 06:58:57
When we make m_owner strong again we can simplify
| |
65 m_owner->clearNodeLists(); | |
66 m_owner.clear(); | |
67 } | |
68 } | |
69 #endif | |
70 | |
61 void NodeRareData::traceAfterDispatch(Visitor* visitor) | 71 void NodeRareData::traceAfterDispatch(Visitor* visitor) |
62 { | 72 { |
63 visitor->trace(m_mutationObserverData); | 73 visitor->trace(m_mutationObserverData); |
74 visitor->trace(m_nodeLists); | |
64 } | 75 } |
65 | 76 |
66 void NodeRareData::trace(Visitor* visitor) | 77 void NodeRareData::trace(Visitor* visitor) |
67 { | 78 { |
68 if (m_isElementRareData) | 79 if (m_isElementRareData) |
69 static_cast<ElementRareData*>(this)->traceAfterDispatch(visitor); | 80 static_cast<ElementRareData*>(this)->traceAfterDispatch(visitor); |
70 else | 81 else |
71 traceAfterDispatch(visitor); | 82 traceAfterDispatch(visitor); |
72 } | 83 } |
73 | 84 |
74 void NodeRareData::finalizeGarbageCollectedObject() | 85 void NodeRareData::finalizeGarbageCollectedObject() |
75 { | 86 { |
76 RELEASE_ASSERT(!renderer()); | 87 RELEASE_ASSERT(!renderer()); |
77 if (m_isElementRareData) | 88 if (m_isElementRareData) |
78 static_cast<ElementRareData*>(this)->~ElementRareData(); | 89 static_cast<ElementRareData*>(this)->~ElementRareData(); |
79 else | 90 else |
80 this->~NodeRareData(); | 91 this->~NodeRareData(); |
81 } | 92 } |
82 | 93 |
83 // Ensure the 10 bits reserved for the m_connectedFrameCount cannot overflow | 94 // Ensure the 10 bits reserved for the m_connectedFrameCount cannot overflow |
84 COMPILE_ASSERT(Page::maxNumberOfFrames < (1 << NodeRareData::ConnectedFrameCount Bits), Frame_limit_should_fit_in_rare_data_count); | 95 COMPILE_ASSERT(Page::maxNumberOfFrames < (1 << NodeRareData::ConnectedFrameCount Bits), Frame_limit_should_fit_in_rare_data_count); |
85 | 96 |
86 } // namespace WebCore | 97 } // namespace WebCore |
OLD | NEW |