| Index: Source/core/dom/MutationObserver.h
|
| diff --git a/Source/core/dom/MutationObserver.h b/Source/core/dom/MutationObserver.h
|
| index 086e600ea428368e05cd9bb3eb91009603317679..fad6e044da2994c440ddee1574861cd924adbd52 100644
|
| --- a/Source/core/dom/MutationObserver.h
|
| +++ b/Source/core/dom/MutationObserver.h
|
| @@ -32,6 +32,7 @@
|
| #define MutationObserver_h
|
|
|
| #include "bindings/v8/ScriptWrappable.h"
|
| +#include "platform/heap/Handle.h"
|
| #include "wtf/HashSet.h"
|
| #include "wtf/PassOwnPtr.h"
|
| #include "wtf/PassRefPtr.h"
|
| @@ -51,7 +52,7 @@ class Node;
|
| typedef unsigned char MutationObserverOptions;
|
| typedef unsigned char MutationRecordDeliveryOptions;
|
|
|
| -class MutationObserver : public RefCounted<MutationObserver>, public ScriptWrappable {
|
| +class MutationObserver FINAL : public RefCountedWillBeGarbageCollectedFinalized<MutationObserver>, public ScriptWrappable {
|
| public:
|
| enum MutationType {
|
| ChildList = 1 << 0,
|
| @@ -71,23 +72,25 @@ public:
|
| CharacterDataOldValue = 1 << 6,
|
| };
|
|
|
| - static PassRefPtr<MutationObserver> create(PassOwnPtr<MutationCallback>);
|
| + static PassRefPtrWillBeRawPtr<MutationObserver> create(PassOwnPtr<MutationCallback>);
|
| static void resumeSuspendedObservers();
|
| static void deliverMutations();
|
|
|
| ~MutationObserver();
|
|
|
| void observe(Node*, const Dictionary&, ExceptionState&);
|
| - Vector<RefPtr<MutationRecord> > takeRecords();
|
| + WillBeHeapVector<RefPtrWillBeMember<MutationRecord> > takeRecords();
|
| void disconnect();
|
| void observationStarted(MutationObserverRegistration*);
|
| void observationEnded(MutationObserverRegistration*);
|
| - void enqueueMutationRecord(PassRefPtr<MutationRecord>);
|
| + void enqueueMutationRecord(PassRefPtrWillBeRawPtr<MutationRecord>);
|
| void setHasTransientRegistration();
|
| bool canDeliver();
|
|
|
| HashSet<Node*> getObservedNodes() const;
|
|
|
| + void trace(Visitor*);
|
| +
|
| private:
|
| struct ObserverLessThan;
|
|
|
| @@ -95,8 +98,8 @@ private:
|
| void deliver();
|
|
|
| OwnPtr<MutationCallback> m_callback;
|
| - Vector<RefPtr<MutationRecord> > m_records;
|
| - HashSet<MutationObserverRegistration*> m_registrations;
|
| + WillBeHeapVector<RefPtrWillBeMember<MutationRecord> > m_records;
|
| + WillBeHeapHashSet<RawPtrWillBeWeakMember<MutationObserverRegistration> > m_registrations;
|
| unsigned m_priority;
|
| };
|
|
|
|
|