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

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: 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/IdTargetObserverRegistry.h
diff --git a/Source/core/dom/IdTargetObserverRegistry.h b/Source/core/dom/IdTargetObserverRegistry.h
index 2f047ecb329a7a89dd9c9042e54dc2c7d93c2dbe..941e1fb4fe11bd50f3931aa7779d55185e0de049 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 : public NoBaseWillBeGarbageCollectedFinalized<IdTargetObserverRegistry> {
zerny-chromium 2014/05/09 08:01:49 FINAL
tkent 2014/05/09 09:37:20 Done.
+ 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;
haraken 2014/05/09 07:01:35 Just to confirm: This is a Member, not a WeakMembe
tkent 2014/05/09 09:37:20 Right. This cycle (IdTargetObserverRegistry -> Ob
+ typedef WillBeHeapHashMap<StringImpl*, OwnPtrWillBeMember<ObserverSet> > IdToObserverSetMap;
IdToObserverSetMap m_registry;
- ObserverSet* m_notifyingObserversInSet;
+ RawPtrWillBeMember<ObserverSet> m_notifyingObserversInSet;
};
inline void IdTargetObserverRegistry::notifyObservers(const AtomicString& id)

Powered by Google App Engine
This is Rietveld 408576698