Index: Source/core/html/imports/HTMLImportChild.cpp |
diff --git a/Source/core/html/imports/HTMLImportChild.cpp b/Source/core/html/imports/HTMLImportChild.cpp |
index 34972b2fad5ff637e59e20b88cf8d9c5f0ad9a87..7a02c587ea69dc086d1162e12dfcf5a687594ae4 100644 |
--- a/Source/core/html/imports/HTMLImportChild.cpp |
+++ b/Source/core/html/imports/HTMLImportChild.cpp |
@@ -139,13 +139,13 @@ Document* HTMLImportChild::document() const |
void HTMLImportChild::stateWillChange() |
{ |
toHTMLImportsController(root())->scheduleRecalcState(); |
+ ensureLoader(); |
} |
void HTMLImportChild::stateDidChange() |
{ |
HTMLImport::stateDidChange(); |
- ensureLoader(); |
if (state().isReady()) |
didFinish(); |
} |
@@ -184,7 +184,7 @@ void HTMLImportChild::shareLoader(HTMLImportChild* loader) |
bool HTMLImportChild::isDone() const |
{ |
- return m_loader && m_loader->isDone() && !m_customElementMicrotaskStep; |
+ return m_loader && m_loader->isDone() && !m_loader->microtaskQueue()->needsProcessOrStop() && !m_customElementMicrotaskStep; |
} |
bool HTMLImportChild::loaderHasError() const |