Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: Source/core/dom/custom/CustomElementUpgradeCandidateMap.h

Issue 296703009: Oilpan: move custom element objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation issue pointed out by clang Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..e92262eb6b988961fe64acc13ece9cb47fbcb218 100644
--- a/Source/core/dom/custom/CustomElementUpgradeCandidateMap.h
+++ b/Source/core/dom/custom/CustomElementUpgradeCandidateMap.h
@@ -35,38 +35,40 @@
#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&);
+ PassOwnPtrWillBeRawPtr<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;
UnresolvedDefinitionMap m_unresolvedDefinitions;
};
« no previous file with comments | « Source/core/dom/custom/CustomElementScheduler.cpp ('k') | Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698