Bug 1380905 - Allow HTMLComboboxAccessible to be shut down twice. r=Jamie

Accessibles can be shut down twice. For example, their doc might shut
them down in its own ShutDown, while a reference is still being held by
a dispatched event. When the event goes away, or the cycle collector
kicks in, the accessible may be finally released and shut down again via
LastRelease.

Differential Revision: https://phabricator.services.mozilla.com/D31815

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Eitan Isaacson 2019-05-22 04:50:31 +00:00
Родитель 993c03acb1
Коммит cf9dd32a8b
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -304,7 +304,7 @@ bool HTMLComboboxAccessible::RemoveChild(Accessible* aChild) {
}
void HTMLComboboxAccessible::Shutdown() {
MOZ_ASSERT(mDoc->IsDefunct() || !mListAccessible);
MOZ_ASSERT(!mDoc || mDoc->IsDefunct() || !mListAccessible);
if (mListAccessible) {
mListAccessible->Shutdown();
mListAccessible = nullptr;