diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 5d8b2ce86b97..78b5d017c476 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -220,7 +220,6 @@ #include "nsIWebNavigationInfo.h" #include "nsPluginHost.h" #include "mozilla/HangAnnotations.h" -#include "mozilla/ServoRestyleManager.h" #include "mozilla/Encoding.h" #include "nsIBidiKeyboard.h" @@ -5324,12 +5323,6 @@ void nsContentUtils::DestroyAnonymousContent(nsCOMPtr* aContent) { if (*aContent) { - // Don't wait until UnbindFromTree to clear ServoElementData, since - // leak checking at shutdown can run before the AnonymousContentDestroyer - // runs. - if ((*aContent)->IsStyledByServo() && (*aContent)->IsElement()) { - ServoRestyleManager::ClearServoDataFromSubtree((*aContent)->AsElement()); - } AddScriptRunner(new AnonymousContentDestroyer(aContent)); } } @@ -5339,12 +5332,6 @@ void nsContentUtils::DestroyAnonymousContent(nsCOMPtr* aElement) { if (*aElement) { - // Don't wait until UnbindFromTree to clear ServoElementData, since - // leak checking at shutdown can run before the AnonymousContentDestroyer - // runs. - if ((*aElement)->IsStyledByServo()) { - ServoRestyleManager::ClearServoDataFromSubtree(*aElement); - } AddScriptRunner(new AnonymousContentDestroyer(aElement)); } }