Chromium Code Reviews| Index: Source/core/dom/custom/CustomElementMicrotaskQueue.h |
| diff --git a/Source/core/dom/custom/CustomElementMicrotaskQueue.h b/Source/core/dom/custom/CustomElementMicrotaskQueue.h |
| index e3b1840224d4ed5e863e8ef6daedbaf369fc11e1..02bcd1dbb2dbdd09aadba15c0f68b0df34ead3cd 100644 |
| --- a/Source/core/dom/custom/CustomElementMicrotaskQueue.h |
| +++ b/Source/core/dom/custom/CustomElementMicrotaskQueue.h |
| @@ -32,6 +32,7 @@ |
| #define CustomElementMicrotaskQueue_h |
| #include "core/dom/custom/CustomElementMicrotaskStep.h" |
| +#include "platform/heap/Handle.h" |
| #include "wtf/OwnPtr.h" |
| #include "wtf/PassOwnPtr.h" |
| #include "wtf/PassRefPtr.h" |
| @@ -41,26 +42,30 @@ |
| namespace WebCore { |
| -class CustomElementMicrotaskQueue : public RefCounted<CustomElementMicrotaskQueue> { |
| +class CustomElementMicrotaskQueue FINAL : public RefCountedWillBeGarbageCollectedFinalized<CustomElementMicrotaskQueue> { |
|
haraken
2014/05/27 01:08:45
This can be RefCountedWillBeGarbageCollected.
|
| WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueue); |
| public: |
| - static PassRefPtr<CustomElementMicrotaskQueue> create() { return adoptRef(new CustomElementMicrotaskQueue()); } |
| - |
| + static PassRefPtrWillBeRawPtr<CustomElementMicrotaskQueue> create() |
| + { |
| + return adoptRefWillBeNoop(new CustomElementMicrotaskQueue()); |
| + } |
| bool isEmpty() const { return m_queue.isEmpty(); } |
| - void enqueue(PassOwnPtr<CustomElementMicrotaskStep>); |
| + void enqueue(PassOwnPtrWillBeRawPtr<CustomElementMicrotaskStep>); |
| typedef CustomElementMicrotaskStep::Result Result; |
| Result dispatch(); |
| bool needsProcessOrStop() const; |
| + void trace(Visitor*); |
| + |
| #if !defined(NDEBUG) |
| void show(unsigned indent); |
| #endif |
| private: |
| CustomElementMicrotaskQueue() { } |
| - Vector<OwnPtr<CustomElementMicrotaskStep> > m_queue; |
| + WillBeHeapVector<OwnPtrWillBeMember<CustomElementMicrotaskStep> > m_queue; |
| }; |
| } |