Chromium Code Reviews| Index: Source/core/dom/custom/CustomElementUpgradeCandidateMap.h |
| diff --git a/Source/core/dom/custom/CustomElementUpgradeCandidateMap.h b/Source/core/dom/custom/CustomElementUpgradeCandidateMap.h |
| index f68c50b65be76cea7412a881ba3ae7c256da5742..c7a09faab884ece46d063f539e0fbcefa342b78e 100644 |
| --- a/Source/core/dom/custom/CustomElementUpgradeCandidateMap.h |
| +++ b/Source/core/dom/custom/CustomElementUpgradeCandidateMap.h |
| @@ -35,38 +35,42 @@ |
| #include "core/dom/custom/CustomElementDescriptorHash.h" |
| #include "core/dom/custom/CustomElementObserver.h" |
| #include "wtf/HashMap.h" |
| -#include "wtf/ListHashSet.h" |
| +#include "wtf/LinkedHashSet.h" |
| #include "wtf/Noncopyable.h" |
| namespace WebCore { |
| class Element; |
| -class CustomElementUpgradeCandidateMap : CustomElementObserver { |
| +class CustomElementUpgradeCandidateMap FINAL : public CustomElementObserver { |
| WTF_MAKE_NONCOPYABLE(CustomElementUpgradeCandidateMap); |
| public: |
| - CustomElementUpgradeCandidateMap() { } |
| - ~CustomElementUpgradeCandidateMap(); |
| + static PassOwnPtrWillBeRawPtr<CustomElementUpgradeCandidateMap> create(); |
| + virtual ~CustomElementUpgradeCandidateMap(); |
| // API for CustomElementRegistrationContext to save and take candidates |
| - typedef ListHashSet<Element*> ElementSet; |
| + typedef WillBeHeapLinkedHashSet<RawPtrWillBeWeakMember<Element> > ElementSet; |
| void add(const CustomElementDescriptor&, Element*); |
| void remove(Element*); |
| - ElementSet takeUpgradeCandidatesFor(const CustomElementDescriptor&); |
| + const ElementSet* takeUpgradeCandidatesFor(const CustomElementDescriptor&); |
| + |
| + virtual void trace(Visitor*) OVERRIDE; |
| private: |
| + CustomElementUpgradeCandidateMap() { } |
| + |
| virtual void elementWasDestroyed(Element*) OVERRIDE; |
| void removeCommon(Element*); |
| virtual void elementDidFinishParsingChildren(Element*) OVERRIDE; |
| void moveToEnd(Element*); |
| - typedef HashMap<Element*, CustomElementDescriptor> UpgradeCandidateMap; |
| + typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<Element>, CustomElementDescriptor> UpgradeCandidateMap; |
| UpgradeCandidateMap m_upgradeCandidates; |
| - typedef HashMap<CustomElementDescriptor, ElementSet> UnresolvedDefinitionMap; |
| + typedef WillBeHeapHashMap<CustomElementDescriptor, OwnPtrWillBeMember<ElementSet> > UnresolvedDefinitionMap; |
|
haraken
2014/05/26 15:40:23
I'm curious why you didn't use WillBeHeapHashMap<C
sof
2014/05/26 15:46:18
LinkedHashSet<>s are not allowed used as inline va
|
| UnresolvedDefinitionMap m_unresolvedDefinitions; |
| }; |