Bug 1364361 - Part 3: Remove now-unnecessary clearing of ServoElementData from anonymous content destroyer callback. r=bz
MozReview-Commit-ID: 4nCQYU9lzKD
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -215,17 +215,16 @@
#include "mozilla/EnumSet.h"
#include "mozilla/BloomFilter.h"
#include "TabChild.h"
#include "mozilla/dom/DocGroup.h"
#include "mozilla/dom/TabGroup.h"
#include "nsIWebNavigationInfo.h"
#include "nsPluginHost.h"
#include "mozilla/HangAnnotations.h"
-#include "mozilla/ServoRestyleManager.h"
#include "mozilla/Encoding.h"
#include "nsIBidiKeyboard.h"
#if defined(XP_WIN)
// Undefine LoadImage to prevent naming conflict with Windows.
#undef LoadImage
#endif
@@ -5319,37 +5318,25 @@ private:
nsCOMPtr<nsIContent> mParent;
};
/* static */
void
nsContentUtils::DestroyAnonymousContent(nsCOMPtr<nsIContent>* 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));
}
}
/* static */
void
nsContentUtils::DestroyAnonymousContent(nsCOMPtr<Element>* 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));
}
}
/* static */
void
nsContentUtils::NotifyInstalledMenuKeyboardListener(bool aInstalling)
{