From fdf5336fc81ea4fe8a5ac6c1a0de82f16adc1cfa Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 16 Jun 2017 17:22:34 +0800 Subject: [PATCH] Bug 1364361 - Part 3: Remove now-unnecessary clearing of ServoElementData from anonymous content destroyer callback. r=bz MozReview-Commit-ID: 4nCQYU9lzKD --HG-- extra : rebase_source : 0fa4962efe97f03f311c18692acf99d3913ea347 --- dom/base/nsContentUtils.cpp | 13 ------------- 1 file changed, 13 deletions(-) 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)); } }