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

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

Issue 249563003: REGRESSION(r171966): Custom elements in async imports don't get upgrade. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/html/imports/HTMLImport.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/imports/HTMLImportChild.cpp
diff --git a/Source/core/html/imports/HTMLImportChild.cpp b/Source/core/html/imports/HTMLImportChild.cpp
index 0dd5ed4b828faae0b84ef5003205a9eca0006c20..34972b2fad5ff637e59e20b88cf8d9c5f0ad9a87 100644
--- a/Source/core/html/imports/HTMLImportChild.cpp
+++ b/Source/core/html/imports/HTMLImportChild.cpp
@@ -95,30 +95,12 @@ void HTMLImportChild::didFinish()
m_client->didFinish();
}
-static bool hasAsyncImportAncestor(HTMLImport* import)
-{
- for (HTMLImport* i = import; i; i = i->parent()) {
- if (!i->isSync())
- return true;
- }
-
- return false;
-}
-
void HTMLImportChild::didFinishLoading()
{
clearResource();
stateWillChange();
if (m_customElementMicrotaskStep)
CustomElementMicrotaskDispatcher::instance().importDidFinish(m_customElementMicrotaskStep.get());
- // FIXME(crbug.com/365956):
- // This is needed because async import currently never consumes the queue and
- // it prevents the children of such an async import from finishing.
- // Their steps are never processed.
- // Although this is clearly not the right fix,
- // https://codereview.chromium.org/249563003/ should get rid of this part.
- if (hasAsyncImportAncestor(this))
- didFinishUpgradingCustomElements();
}
void HTMLImportChild::didFinishUpgradingCustomElements()
@@ -178,7 +160,7 @@ void HTMLImportChild::ensureLoader()
else
createLoader();
- if (isSync() && !isDone()) {
+ if (!isDone() && !formsCycle()) {
ASSERT(!m_customElementMicrotaskStep);
m_customElementMicrotaskStep = CustomElement::didCreateImport(this)->weakPtr();
}
« no previous file with comments | « Source/core/html/imports/HTMLImport.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698