Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(736)

Unified Diff: Source/core/dom/custom/CustomElementSyncMicrotaskQueue.cpp

Issue 334253005: Custom Elements: Encapsulates Async and Sync Queues into one class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/custom/CustomElementSyncMicrotaskQueue.cpp
diff --git a/Source/core/dom/custom/CustomElementAsyncImportMicrotaskQueue.cpp b/Source/core/dom/custom/CustomElementSyncMicrotaskQueue.cpp
similarity index 77%
copy from Source/core/dom/custom/CustomElementAsyncImportMicrotaskQueue.cpp
copy to Source/core/dom/custom/CustomElementSyncMicrotaskQueue.cpp
index 3fcf748a7fb9fddb89e041f7df2cd196ff95dade..d17695385b0215cfa5502152772e4ed102fed200 100644
--- a/Source/core/dom/custom/CustomElementAsyncImportMicrotaskQueue.cpp
+++ b/Source/core/dom/custom/CustomElementSyncMicrotaskQueue.cpp
@@ -29,27 +29,25 @@
*/
#include "config.h"
-#include "core/dom/custom/CustomElementAsyncImportMicrotaskQueue.h"
-
-#include "core/dom/custom/CustomElementMicrotaskImportStep.h"
+#include "core/dom/custom/CustomElementSyncMicrotaskQueue.h"
namespace WebCore {
-void CustomElementAsyncImportMicrotaskQueue::enqueue(PassOwnPtrWillBeRawPtr<CustomElementMicrotaskImportStep> step)
+void CustomElementSyncMicrotaskQueue::enqueue(PassOwnPtrWillBeRawPtr<CustomElementMicrotaskStep> step)
{
m_queue.append(step);
}
-void CustomElementAsyncImportMicrotaskQueue::doDispatch()
+void CustomElementSyncMicrotaskQueue::doDispatch()
{
- WillBeHeapVector<OwnPtrWillBeMember<CustomElementMicrotaskStep> > remaining;
+ unsigned i;
- for (unsigned i = 0; i < m_queue.size(); ++i) {
+ for (i = 0; i < m_queue.size(); ++i) {
if (CustomElementMicrotaskStep::Processing == m_queue[i]->process())
- remaining.append(m_queue[i].release());
+ break;
}
- m_queue.swap(remaining);
+ m_queue.remove(0, i);
dominicc (has gone to gerrit) 2014/06/17 00:29:23 Doesn't queue have a clear or something?
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698