diff --git a/dom/base/StyleSheetList.cpp b/dom/base/StyleSheetList.cpp index e1815c96f003..d96d0b21a4d0 100644 --- a/dom/base/StyleSheetList.cpp +++ b/dom/base/StyleSheetList.cpp @@ -34,6 +34,7 @@ void StyleSheetList::NodeWillBeDestroyed(nsINode* aNode) { StyleSheetList::StyleSheetList(DocumentOrShadowRoot& aScope) : mDocumentOrShadowRoot(&aScope) { + SetEnabledCallbacks(nsIMutationObserver::kNodeWillBeDestroyed); mDocumentOrShadowRoot->AsNode().AddMutationObserver(this); }