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

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

Issue 238923009: HTML Imports: No more BlockingDocumentCreation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed the build breakage Created 6 years, 8 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/CustomElementMicrotaskImportStep.cpp
diff --git a/Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp b/Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp
index 9dcc8515b78e4abc2efc6c0df278a64d3cbbaae9..8d0b81a09f7ee92a47edc442a1154777e5ccbd64 100644
--- a/Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp
+++ b/Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp
@@ -32,20 +32,23 @@
#include "core/dom/custom/CustomElementMicrotaskImportStep.h"
#include "core/dom/custom/CustomElementMicrotaskDispatcher.h"
+#include "core/dom/custom/RefCountedCustomElementMicrotaskQueue.h"
namespace WebCore {
-PassOwnPtr<CustomElementMicrotaskImportStep> CustomElementMicrotaskImportStep::create()
+PassOwnPtr<CustomElementMicrotaskImportStep> CustomElementMicrotaskImportStep::create(PassRefPtr<RefCountedCustomElementMicrotaskQueue> queue)
{
- return adoptPtr(new CustomElementMicrotaskImportStep());
+ return adoptPtr(new CustomElementMicrotaskImportStep(queue));
}
-void CustomElementMicrotaskImportStep::enqueue(PassOwnPtr<CustomElementMicrotaskStep> step)
+CustomElementMicrotaskImportStep::CustomElementMicrotaskImportStep(PassRefPtr<RefCountedCustomElementMicrotaskQueue> queue)
+ : m_importFinished(false)
+ , m_queue(queue)
+{
+}
+
+CustomElementMicrotaskImportStep::~CustomElementMicrotaskImportStep()
{
- // work should not be being created after the import is done
- // because the parser is done
- ASSERT(!m_importFinished);
- m_queue.enqueue(step);
}
void CustomElementMicrotaskImportStep::importDidFinish()
@@ -58,7 +61,7 @@ void CustomElementMicrotaskImportStep::importDidFinish()
CustomElementMicrotaskStep::Result CustomElementMicrotaskImportStep::process()
{
- Result result = m_queue.dispatch();
+ Result result = m_queue->dispatch();
if (!m_importFinished)
result = Result(result | ShouldStop);
return result;

Powered by Google App Engine
This is Rietveld 408576698