Bug 1856084 - Destroy nsLanguageAtomService even if nsLayoutStatics isn't destroyed. r=platform-i18n-reviewers,dminor

When looking pernos debug session, since `nsLayoutStatics` isn't destroyed,
`nsLanguageAtomService` isn't destroyed. It seems to be some objects are
leaked according to stdout and stderr on debug build.

So we should destroy this service to avoid other debug assertion even if
`nsLayoutStatics` isn't destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D192607
This commit is contained in:
Makoto Kato 2023-11-03 03:56:41 +00:00
Родитель f66168d2bc
Коммит afd374a967
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -47,7 +47,6 @@
#include "mozilla/dom/HTMLDNSPrefetch.h"
#include "mozilla/dom/HTMLInputElement.h"
#include "mozilla/dom/SVGElementFactory.h"
#include "nsLanguageAtomService.h"
#include "nsMathMLAtoms.h"
#include "nsMathMLOperators.h"
#include "Navigator.h"
@ -318,7 +317,6 @@ void nsLayoutStatics::Shutdown() {
HTMLDNSPrefetch::Shutdown();
nsCSSRendering::Shutdown();
StaticPresData::Shutdown();
nsLanguageAtomService::Shutdown();
#ifdef DEBUG
nsIFrame::DisplayReflowShutdown();
#endif

Просмотреть файл

@ -63,6 +63,7 @@
#include "nsAtomTable.h"
#include "nsISupportsImpl.h"
#include "nsLanguageAtomService.h"
#include "nsSystemInfo.h"
#include "nsMemoryReporterManager.h"
@ -762,6 +763,8 @@ nsresult ShutdownXPCOM(nsIServiceManager* aServMgr) {
nsComponentManagerImpl::gComponentManager = nullptr;
nsCategoryManager::Destroy();
nsLanguageAtomService::Shutdown();
GkRust_Shutdown();
#ifdef NS_FREE_PERMANENT_DATA