Index: Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp |
diff --git a/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp b/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp |
index 31c14b69e6a4b7894107edf1088b29023e3b9d6a..1b69f3870ea85054aa028c8b8a883b0de86d6b7f 100644 |
--- a/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp |
+++ b/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp |
@@ -6,13 +6,11 @@ |
#include "core/dom/custom/CustomElementMicrotaskDispatcher.h" |
#include "core/dom/Microtask.h" |
-#include "core/dom/custom/CustomElementAsyncImportMicrotaskQueue.h" |
#include "core/dom/custom/CustomElementCallbackDispatcher.h" |
#include "core/dom/custom/CustomElementCallbackQueue.h" |
#include "core/dom/custom/CustomElementMicrotaskImportStep.h" |
-#include "core/dom/custom/CustomElementMicrotaskQueue.h" |
+#include "core/dom/custom/CustomElementPendingMicrotaskSet.h" |
#include "core/dom/custom/CustomElementScheduler.h" |
-#include "core/html/imports/HTMLImportLoader.h" |
#include "wtf/MainThread.h" |
namespace WebCore { |
@@ -22,8 +20,7 @@ static const CustomElementCallbackQueue::ElementQueueId kMicrotaskQueueId = 0; |
CustomElementMicrotaskDispatcher::CustomElementMicrotaskDispatcher() |
: m_hasScheduledMicrotask(false) |
, m_phase(Quiescent) |
- , m_resolutionAndImports(CustomElementMicrotaskQueue::create()) |
- , m_asyncImports(CustomElementAsyncImportMicrotaskQueue::create()) |
+ , m_resolutionAndImports(CustomElementPendingMicrotaskSet::create()) |
{ |
} |
@@ -38,19 +35,13 @@ CustomElementMicrotaskDispatcher& CustomElementMicrotaskDispatcher::instance() |
void CustomElementMicrotaskDispatcher::enqueue(HTMLImportLoader* parentLoader, PassOwnPtrWillBeRawPtr<CustomElementMicrotaskStep> step) |
{ |
ensureMicrotaskScheduledForMicrotaskSteps(); |
- if (parentLoader) |
- parentLoader->microtaskQueue()->enqueue(step); |
- else |
- m_resolutionAndImports->enqueue(step); |
+ m_resolutionAndImports->enqueue(parentLoader, step); |
dominicc (has gone to gerrit)
2014/06/18 00:11:27
I guess if it is a set this method should be add a
|
} |
void CustomElementMicrotaskDispatcher::enqueue(HTMLImportLoader* parentLoader, PassOwnPtrWillBeRawPtr<CustomElementMicrotaskImportStep> step, bool importIsSync) |
{ |
ensureMicrotaskScheduledForMicrotaskSteps(); |
- if (importIsSync) |
- enqueue(parentLoader, PassOwnPtrWillBeRawPtr<CustomElementMicrotaskStep>(step)); |
- else |
- m_asyncImports->enqueue(step); |
+ m_resolutionAndImports->enqueue(parentLoader, step, importIsSync); |
} |
void CustomElementMicrotaskDispatcher::enqueue(CustomElementCallbackQueue* queue) |
@@ -104,8 +95,6 @@ void CustomElementMicrotaskDispatcher::doDispatch() |
m_phase = Resolving; |
m_resolutionAndImports->dispatch(); |
- if (m_resolutionAndImports->isEmpty()) |
- m_asyncImports->dispatch(); |
m_phase = DispatchingCallbacks; |
for (WillBeHeapVector<RawPtrWillBeMember<CustomElementCallbackQueue> >::iterator it = m_elements.begin(); it != m_elements.end(); ++it) { |
@@ -122,7 +111,6 @@ void CustomElementMicrotaskDispatcher::doDispatch() |
void CustomElementMicrotaskDispatcher::trace(Visitor* visitor) |
{ |
visitor->trace(m_resolutionAndImports); |
- visitor->trace(m_asyncImports); |
#if ENABLE(OILPAN) |
visitor->trace(m_elements); |
#endif |
@@ -131,11 +119,7 @@ void CustomElementMicrotaskDispatcher::trace(Visitor* visitor) |
#if !defined(NDEBUG) |
void CustomElementMicrotaskDispatcher::show() |
{ |
- fprintf(stderr, "Dispatcher:\n"); |
- fprintf(stderr, " Sync:\n"); |
- m_resolutionAndImports->show(3); |
- fprintf(stderr, " Async:\n"); |
- m_asyncImports->show(3); |
+ m_resolutionAndImports->show(2); |
} |
#endif |