| Index: Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp
|
| diff --git a/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp b/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp
|
| index ccbbed39b8fba00d16423aee900933929ea26b33..ed4b003be74ab244e40292a7194f2dd44b173e57 100644
|
| --- a/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp
|
| +++ b/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp
|
| @@ -35,11 +35,20 @@
|
|
|
| namespace WebCore {
|
|
|
| +PassOwnPtrWillBeRawPtr<CustomElementUpgradeCandidateMap> CustomElementUpgradeCandidateMap::create()
|
| +{
|
| + return adoptPtrWillBeNoop(new CustomElementUpgradeCandidateMap());
|
| +}
|
| +
|
| CustomElementUpgradeCandidateMap::~CustomElementUpgradeCandidateMap()
|
| {
|
| +#if !ENABLE(OILPAN)
|
| + // With Oilpan enabled, the observer table keeps a weak reference to the
|
| + // element; no need for explicit removal.
|
| UpgradeCandidateMap::const_iterator::Keys end = m_upgradeCandidates.end().keys();
|
| for (UpgradeCandidateMap::const_iterator::Keys it = m_upgradeCandidates.begin().keys(); it != end; ++it)
|
| unobserve(*it);
|
| +#endif
|
| }
|
|
|
| void CustomElementUpgradeCandidateMap::add(const CustomElementDescriptor& descriptor, Element* element)
|
| @@ -98,9 +107,9 @@ void CustomElementUpgradeCandidateMap::moveToEnd(Element* element)
|
| elements->value.appendOrMoveToLast(element);
|
| }
|
|
|
| -ListHashSet<Element*> CustomElementUpgradeCandidateMap::takeUpgradeCandidatesFor(const CustomElementDescriptor& descriptor)
|
| +CustomElementUpgradeCandidateMap::ElementSet CustomElementUpgradeCandidateMap::takeUpgradeCandidatesFor(const CustomElementDescriptor& descriptor)
|
| {
|
| - const ListHashSet<Element*>& candidates = m_unresolvedDefinitions.take(descriptor);
|
| + const ElementSet& candidates = m_unresolvedDefinitions.take(descriptor);
|
|
|
| for (ElementSet::const_iterator candidate = candidates.begin(); candidate != candidates.end(); ++candidate) {
|
| unobserve(*candidate);
|
| @@ -110,4 +119,11 @@ ListHashSet<Element*> CustomElementUpgradeCandidateMap::takeUpgradeCandidatesFor
|
| return candidates;
|
| }
|
|
|
| +void CustomElementUpgradeCandidateMap::trace(Visitor* visitor)
|
| +{
|
| + visitor->trace(m_upgradeCandidates);
|
| + visitor->trace(m_unresolvedDefinitions);
|
| + CustomElementObserver::trace(visitor);
|
| +}
|
| +
|
| }
|
|
|