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

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

Issue 299313013: Remove indirection plumbing from HTMLImportChild. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. 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
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.h ('k') | Source/core/html/imports/HTMLImportStateResolver.cpp » ('j') | 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 3442649669795561b08db996bfe4f01f30a02191..fd6e83888db6193149f837cb722e8d5479e1dd3d 100644
--- a/Source/core/html/imports/HTMLImportChild.cpp
+++ b/Source/core/html/imports/HTMLImportChild.cpp
@@ -91,29 +91,20 @@ void HTMLImportChild::didFinishUpgradingCustomElements()
m_customElementMicrotaskStep.clear();
}
-bool HTMLImportChild::isLoaded() const
-{
- return m_loader && m_loader->isDone();
-}
-
-bool HTMLImportChild::isFirst() const
-{
- return m_loader && m_loader->isFirstImport(this);
-}
-
void HTMLImportChild::importDestroyed()
{
if (parent())
parent()->removeChild(this);
- if (m_loader) {
- m_loader->removeImport(this);
- m_loader = 0;
- }
+
+ ASSERT(m_loader);
+ m_loader->removeImport(this);
+ m_loader = 0;
}
Document* HTMLImportChild::document() const
{
- return m_loader ? m_loader->document() : 0;
+ ASSERT(m_loader);
+ return m_loader->document();
}
void HTMLImportChild::stateWillChange()
@@ -153,15 +144,18 @@ void HTMLImportChild::createCustomElementMicrotaskStepIfNeeded()
bool HTMLImportChild::isDone() const
{
- return m_loader && m_loader->isDone() && m_loader->microtaskQueue()->isEmpty() && !m_customElementMicrotaskStep;
+ ASSERT(m_loader);
+
+ return m_loader->isDone() && m_loader->microtaskQueue()->isEmpty() && !m_customElementMicrotaskStep;
}
-bool HTMLImportChild::loaderHasError() const
+HTMLImportLoader* HTMLImportChild::loader() const
{
- return m_loader && m_loader->hasError();
+ // This should never be called after importDestroyed.
+ ASSERT(m_loader);
+ return m_loader;
}
-
void HTMLImportChild::setClient(HTMLImportChildClient* client)
{
ASSERT(client);
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.h ('k') | Source/core/html/imports/HTMLImportStateResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698