Index: Source/core/dom/custom/CustomElementMicrotaskQueue.h |
diff --git a/Source/core/dom/custom/CustomElementMicrotaskQueue.h b/Source/core/dom/custom/CustomElementMicrotaskQueue.h |
index 02bcd1dbb2dbdd09aadba15c0f68b0df34ead3cd..fbff84be298eb7880c129d28c7567f1efcc61da7 100644 |
--- a/Source/core/dom/custom/CustomElementMicrotaskQueue.h |
+++ b/Source/core/dom/custom/CustomElementMicrotaskQueue.h |
@@ -42,32 +42,38 @@ |
namespace WebCore { |
-class CustomElementMicrotaskQueue FINAL : public RefCountedWillBeGarbageCollectedFinalized<CustomElementMicrotaskQueue> { |
- WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueue); |
+class CustomElementMicrotaskQueueBase : public RefCountedWillBeGarbageCollectedFinalized<CustomElementMicrotaskQueueBase> { |
+ WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueueBase); |
public: |
- static PassRefPtrWillBeRawPtr<CustomElementMicrotaskQueue> create() |
- { |
- return adoptRefWillBeNoop(new CustomElementMicrotaskQueue()); |
- } |
+ virtual ~CustomElementMicrotaskQueueBase() { } |
bool isEmpty() const { return m_queue.isEmpty(); } |
- void enqueue(PassOwnPtrWillBeRawPtr<CustomElementMicrotaskStep>); |
- |
- typedef CustomElementMicrotaskStep::Result Result; |
- Result dispatch(); |
- bool needsProcessOrStop() const; |
+ void dispatch(); |
void trace(Visitor*); |
#if !defined(NDEBUG) |
void show(unsigned indent); |
#endif |
-private: |
- CustomElementMicrotaskQueue() { } |
+ |
+protected: |
+ CustomElementMicrotaskQueueBase() { } |
+ virtual void doDispatch() = 0; |
WillBeHeapVector<OwnPtrWillBeMember<CustomElementMicrotaskStep> > m_queue; |
}; |
+class CustomElementMicrotaskQueue : public CustomElementMicrotaskQueueBase { |
+public: |
+ static PassRefPtrWillBeRawPtr<CustomElementMicrotaskQueue> create() { return adoptRefWillBeNoop(new CustomElementMicrotaskQueue()); } |
+ |
+ void enqueue(PassOwnPtr<CustomElementMicrotaskStep>); |
+ |
+private: |
+ CustomElementMicrotaskQueue() { } |
+ virtual void doDispatch(); |
+}; |
+ |
} |
#endif // CustomElementMicrotaskQueue_h |