зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 65c77754d49c (bug 1364361)
This commit is contained in:
Родитель
18f74a4448
Коммит
3ed689e8af
|
@ -220,6 +220,7 @@
|
|||
#include "nsIWebNavigationInfo.h"
|
||||
#include "nsPluginHost.h"
|
||||
#include "mozilla/HangAnnotations.h"
|
||||
#include "mozilla/ServoRestyleManager.h"
|
||||
#include "mozilla/Encoding.h"
|
||||
|
||||
#include "nsIBidiKeyboard.h"
|
||||
|
@ -5323,6 +5324,12 @@ 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));
|
||||
}
|
||||
}
|
||||
|
@ -5332,6 +5339,12 @@ 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));
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче