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

Unified Diff: Source/core/dom/IdTargetObserverRegistry.h

Issue 278803002: Oilpan: Prepare to move IdTargetObserver and IdTargetObserverRegistry to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: apply comments 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
« no previous file with comments | « Source/core/dom/IdTargetObserver.cpp ('k') | Source/core/dom/IdTargetObserverRegistry.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/IdTargetObserverRegistry.h
diff --git a/Source/core/dom/IdTargetObserverRegistry.h b/Source/core/dom/IdTargetObserverRegistry.h
index 2f047ecb329a7a89dd9c9042e54dc2c7d93c2dbe..cb191e35cdf68b92a138151104e3b90e0f6cfa96 100644
--- a/Source/core/dom/IdTargetObserverRegistry.h
+++ b/Source/core/dom/IdTargetObserverRegistry.h
@@ -26,6 +26,7 @@
#ifndef IdTargetObserverRegistry_h
#define IdTargetObserverRegistry_h
+#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/HashMap.h"
#include "wtf/HashSet.h"
@@ -36,24 +37,26 @@ namespace WebCore {
class IdTargetObserver;
-class IdTargetObserverRegistry {
- WTF_MAKE_NONCOPYABLE(IdTargetObserverRegistry); WTF_MAKE_FAST_ALLOCATED;
+class IdTargetObserverRegistry FINAL : public NoBaseWillBeGarbageCollectedFinalized<IdTargetObserverRegistry> {
+ WTF_MAKE_NONCOPYABLE(IdTargetObserverRegistry);
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
friend class IdTargetObserver;
public:
- static PassOwnPtr<IdTargetObserverRegistry> create();
+ static PassOwnPtrWillBeRawPtr<IdTargetObserverRegistry> create();
+ void trace(Visitor*);
void notifyObservers(const AtomicString& id);
bool hasObservers(const AtomicString& id) const;
private:
- IdTargetObserverRegistry() : m_notifyingObserversInSet(0) { }
+ IdTargetObserverRegistry() : m_notifyingObserversInSet(nullptr) { }
void addObserver(const AtomicString& id, IdTargetObserver*);
void removeObserver(const AtomicString& id, IdTargetObserver*);
void notifyObserversInternal(const AtomicString& id);
- typedef HashSet<IdTargetObserver*> ObserverSet;
- typedef HashMap<StringImpl*, OwnPtr<ObserverSet> > IdToObserverSetMap;
+ typedef WillBeHeapHashSet<RawPtrWillBeMember<IdTargetObserver> > ObserverSet;
+ typedef WillBeHeapHashMap<StringImpl*, OwnPtrWillBeMember<ObserverSet> > IdToObserverSetMap;
IdToObserverSetMap m_registry;
- ObserverSet* m_notifyingObserversInSet;
+ RawPtrWillBeMember<ObserverSet> m_notifyingObserversInSet;
};
inline void IdTargetObserverRegistry::notifyObservers(const AtomicString& id)
« no previous file with comments | « Source/core/dom/IdTargetObserver.cpp ('k') | Source/core/dom/IdTargetObserverRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698