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

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

Issue 288323004: HTML Imports: Get rid of needsProcessOrStop() from dom/custom/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switched to two-queue approach Created 6 years, 7 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/CustomElementScheduler.cpp
diff --git a/Source/core/dom/custom/CustomElementScheduler.cpp b/Source/core/dom/custom/CustomElementScheduler.cpp
index 1980496aa6322749dc9bc9e54466e5413e502078..72dccda93f160fa4ecc65e9dcaa938072f153423 100644
--- a/Source/core/dom/custom/CustomElementScheduler.cpp
+++ b/Source/core/dom/custom/CustomElementScheduler.cpp
@@ -84,13 +84,14 @@ CustomElementMicrotaskImportStep* CustomElementScheduler::scheduleImport(HTMLImp
ASSERT(!import->isDone());
ASSERT(import->parent());
- OwnPtr<CustomElementMicrotaskImportStep> step = CustomElementMicrotaskImportStep::create(import);
- CustomElementMicrotaskImportStep* rawStep = step.get();
-
// Ownership of the new step is transferred to the parent
// processing step, or the base queue.
- CustomElementMicrotaskDispatcher::instance().enqueue(import->parent()->loader(), step.release());
-
+ OwnPtr<CustomElementMicrotaskImportStep> step = CustomElementMicrotaskImportStep::create(import);
+ CustomElementMicrotaskImportStep* rawStep = step.get();
+ if (import->isSync())
+ CustomElementMicrotaskDispatcher::instance().enqueue(import->parent()->loader(), step.release());
+ else
+ CustomElementMicrotaskDispatcher::instance().enqueueAsyncImportStep(step.release());
return rawStep;
}

Powered by Google App Engine
This is Rietveld 408576698