Bug 1425866: Just null-check the CSS Loader for now. r=heycam

After discussing with Olli there isn't any kind of severe problem out of this.
Shadow subtrees will be disconnected just like the rest, and they shouldn't
assume that the document hasn't been disconnected first.

MozReview-Commit-ID: CX4fXOqEIFj

--HG--
extra : rebase_source : cd30cb8b8199fb73120c0bcade68986454090005
This commit is contained in:
Emilio Cobos Álvarez 2018-04-27 01:46:50 +02:00
Родитель 29b1e331c0
Коммит 37eed71b1c
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -256,7 +256,8 @@ nsStyleLinkElement::DoUpdateStyleSheet(nsIDocument* aOldDocument,
nsCOMPtr<nsIDocument> doc = thisContent->IsInShadowTree() ?
thisContent->OwnerDoc() : thisContent->GetUncomposedDoc();
if (!doc || !doc->CSSLoader()->GetEnabled()) {
// Loader could be null during unlink, see bug 1425866.
if (!doc || !doc->CSSLoader() || !doc->CSSLoader()->GetEnabled()) {
return Update { };
}