| Index: Source/core/html/imports/HTMLImportLoader.cpp
|
| diff --git a/Source/core/html/imports/HTMLImportLoader.cpp b/Source/core/html/imports/HTMLImportLoader.cpp
|
| index 0eec874bd4a38a47e3a229de24af495699b93538..a80db740166613d80a6d710c7bf300c16018b253 100644
|
| --- a/Source/core/html/imports/HTMLImportLoader.cpp
|
| +++ b/Source/core/html/imports/HTMLImportLoader.cpp
|
| @@ -32,6 +32,7 @@
|
| #include "core/html/imports/HTMLImportLoader.h"
|
|
|
| #include "core/dom/Document.h"
|
| +#include "core/dom/DocumentParser.h"
|
| #include "core/dom/StyleEngine.h"
|
| #include "core/dom/custom/CustomElementSyncMicrotaskQueue.h"
|
| #include "core/html/HTMLDocument.h"
|
| @@ -116,6 +117,10 @@ HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
|
| m_document = HTMLDocument::create(init);
|
| m_writer = DocumentWriter::create(m_document.get(), response.mimeType(), "UTF-8");
|
|
|
| + DocumentParser* parser = m_document->parser();
|
| + ASSERT(parser);
|
| + parser->addClient(this);
|
| +
|
| return StateLoading;
|
| }
|
|
|
| @@ -151,11 +156,15 @@ void HTMLImportLoader::setState(State state)
|
| didFinishLoading();
|
| }
|
|
|
| -void HTMLImportLoader::didFinishParsing()
|
| +void HTMLImportLoader::notifyParserStopped()
|
| {
|
| setState(finishParsing());
|
| if (!hasPendingResources())
|
| setState(finishLoading());
|
| +
|
| + DocumentParser* parser = m_document->parser();
|
| + ASSERT(parser);
|
| + parser->removeClient(this);
|
| }
|
|
|
| void HTMLImportLoader::didRemoveAllPendingStylesheet()
|
|
|