Chromium Code Reviews| Index: Source/core/dom/ScriptedAnimationController.h |
| diff --git a/Source/core/dom/ScriptedAnimationController.h b/Source/core/dom/ScriptedAnimationController.h |
| index acb2f2d627dd72123b0307e80813c1596cfabfd8..c148a2f77cbbd86feffb97416d03434abec31515 100644 |
| --- a/Source/core/dom/ScriptedAnimationController.h |
| +++ b/Source/core/dom/ScriptedAnimationController.h |
| @@ -40,14 +40,15 @@ class Event; |
| class EventTarget; |
| class RequestAnimationFrameCallback; |
| -class ScriptedAnimationController : public RefCounted<ScriptedAnimationController> { |
| +class ScriptedAnimationController : public RefCountedWillBeGarbageCollectedFinalized<ScriptedAnimationController> { |
|
haraken
2014/06/17 06:44:48
Can this be RefCountedWillBeGarbageCollected?
tkent
2014/06/17 06:50:32
No. CallbackList needs finalization.
|
| public: |
| - static PassRefPtr<ScriptedAnimationController> create(Document* document) |
| + static PassRefPtrWillBeRawPtr<ScriptedAnimationController> create(Document* document) |
| { |
| - return adoptRef(new ScriptedAnimationController(document)); |
| + return adoptRefWillBeNoop(new ScriptedAnimationController(document)); |
| } |
| ~ScriptedAnimationController(); |
|
haraken
2014/06/17 06:44:48
Then you'll need to use DEFINE_EMPTY_DESTRUCTOR_WI
|
| - void clearDocumentPointer() { m_document = 0; } |
| + void trace(Visitor*); |
| + void clearDocumentPointer() { m_document = nullptr; } |
| typedef int CallbackId; |
| @@ -73,11 +74,11 @@ private: |
| CallbackList m_callbacks; |
| CallbackList m_callbacksToInvoke; // only non-empty while inside executeCallbacks |
| - Document* m_document; |
| + RawPtrWillBeMember<Document> m_document; |
| CallbackId m_nextCallbackId; |
| int m_suspendCount; |
| - WillBePersistentHeapVector<RefPtrWillBeMember<Event> > m_eventQueue; |
| - ListHashSet<std::pair<const EventTarget*, const StringImpl*> > m_perFrameEvents; |
| + WillBeHeapVector<RefPtrWillBeMember<Event> > m_eventQueue; |
| + WillBeHeapListHashSet<std::pair<RawPtrWillBeMember<const EventTarget>, const StringImpl*> > m_perFrameEvents; |
| }; |
| } |