| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index dd47f2aa3a69bae0508d3521d70c7ca0cc2cefc1..e2ffcd3d20a2427deb069f79eb4b543818d453ce 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -904,13 +904,17 @@ V0CustomElementMicrotaskRunQueue* Document::customElementMicrotaskRunQueue() {
|
| return m_customElementMicrotaskRunQueue.get();
|
| }
|
|
|
| -void Document::setImportsController(HTMLImportsController* controller) {
|
| - DCHECK(!m_importsController || !controller);
|
| - m_importsController = controller;
|
| - if (!m_importsController && !loader())
|
| +void Document::clearImportsController() {
|
| + m_importsController = nullptr;
|
| + if (!loader())
|
| m_fetcher->clearContext();
|
| }
|
|
|
| +void Document::createImportsController() {
|
| + DCHECK(!m_importsController);
|
| + m_importsController = HTMLImportsController::create(*this);
|
| +}
|
| +
|
| HTMLImportLoader* Document::importLoader() const {
|
| if (!m_importsController)
|
| return 0;
|
| @@ -2480,7 +2484,7 @@ void Document::shutdown() {
|
| // thinking they should have access to a valid frame when they don't.
|
| if (m_importsController) {
|
| m_importsController->dispose();
|
| - setImportsController(nullptr);
|
| + clearImportsController();
|
| }
|
|
|
| m_timers.setTimerTaskRunner(Platform::current()
|
|
|