зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1630208 part 3: Clean up the remote XPC document accessible cache on shutdown. r=yzen
The cache should already be empty by this point unless there's a bug, but we should still clean up regardless. Also, the hashtable itself was previously never cleaned up even if it was empty. Differential Revision: https://phabricator.services.mozilla.com/D79781
This commit is contained in:
Родитель
6a5821c667
Коммит
9d61ef8210
|
@ -40,9 +40,9 @@ using namespace mozilla::a11y;
|
|||
using namespace mozilla::dom;
|
||||
|
||||
StaticAutoPtr<nsTArray<DocAccessibleParent*>> DocManager::sRemoteDocuments;
|
||||
nsRefPtrHashtable<nsPtrHashKey<const DocAccessibleParent>,
|
||||
xpcAccessibleDocument>* DocManager::sRemoteXPCDocumentCache =
|
||||
nullptr;
|
||||
StaticAutoPtr<nsRefPtrHashtable<nsPtrHashKey<const DocAccessibleParent>,
|
||||
xpcAccessibleDocument>>
|
||||
DocManager::sRemoteXPCDocumentCache;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// DocManager
|
||||
|
@ -143,6 +143,7 @@ xpcAccessibleDocument* DocManager::GetXPCDocument(DocAccessibleParent* aDoc) {
|
|||
sRemoteXPCDocumentCache =
|
||||
new nsRefPtrHashtable<nsPtrHashKey<const DocAccessibleParent>,
|
||||
xpcAccessibleDocument>;
|
||||
ClearOnShutdown(&sRemoteXPCDocumentCache);
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!aDoc->IsShutdown(), "Adding a shutdown doc to remote XPC cache");
|
||||
|
|
|
@ -172,8 +172,9 @@ class DocManager : public nsIWebProgressListener,
|
|||
xpcAccessibleDocument>
|
||||
XPCDocumentHashtable;
|
||||
XPCDocumentHashtable mXPCDocumentCache;
|
||||
static nsRefPtrHashtable<nsPtrHashKey<const DocAccessibleParent>,
|
||||
xpcAccessibleDocument>* sRemoteXPCDocumentCache;
|
||||
static StaticAutoPtr<nsRefPtrHashtable<
|
||||
nsPtrHashKey<const DocAccessibleParent>, xpcAccessibleDocument>>
|
||||
sRemoteXPCDocumentCache;
|
||||
|
||||
/*
|
||||
* The list of remote top level documents.
|
||||
|
|
Загрузка…
Ссылка в новой задаче