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
This commit is contained in:
Cameron McCormack 2017-06-16 17:22:34 +08:00
parent 3f6d354226
commit fdf5336fc8

View File

@ -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<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));
}
}
@ -5339,12 +5332,6 @@ 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));
}
}