Index: third_party/WebKit/Source/core/html/imports/HTMLImportChild.cpp |
diff --git a/third_party/WebKit/Source/core/html/imports/HTMLImportChild.cpp b/third_party/WebKit/Source/core/html/imports/HTMLImportChild.cpp |
index 8718ce5913f19a5e8e8a2556319f3a7d5ff27399..33f3951e51cc66cd6c17c3befe96773acde9c2af 100644 |
--- a/third_party/WebKit/Source/core/html/imports/HTMLImportChild.cpp |
+++ b/third_party/WebKit/Source/core/html/imports/HTMLImportChild.cpp |
@@ -47,14 +47,19 @@ namespace blink { |
HTMLImportChild::HTMLImportChild(const KURL& url, |
HTMLImportLoader* loader, |
SyncMode sync) |
- : HTMLImport(sync), m_url(url), m_loader(loader), m_client(nullptr) {} |
+ : HTMLImport(sync), m_url(url), m_loader(loader), m_client(nullptr) { |
+ DCHECK(loader); |
+} |
HTMLImportChild::~HTMLImportChild() {} |
void HTMLImportChild::ownerInserted() { |
if (!m_loader->isDone()) |
return; |
- document()->styleEngine().htmlImportAddedOrRemoved(); |
+ |
+ DCHECK(root()); |
+ DCHECK(root()->document()); |
+ root()->document()->styleEngine().htmlImportAddedOrRemoved(); |
// TODO(rune@opera.com): resolverChanged() can be removed once stylesheet |
// updates are async. https://crbug.com/567021 |
root()->document()->styleEngine().resolverChanged(AnalyzedStyleUpdate); |