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

Unified Diff: Source/core/html/imports/HTMLImportChild.cpp

Issue 272243004: HTML Imports: Fix race conditions on HTMLImportsChild (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/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

Powered by Google App Engine
This is Rietveld 408576698