This commit is contained in:
Cameron Kaiser 2019-08-13 19:24:38 -07:00
parent 09a4a8bfc7
commit 6f63dc2cc3

View File

@ -243,8 +243,13 @@ FrameLayerBuilder::DisplayItemData::~DisplayItemData()
array->RemoveElement(this);
}
MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas && sAliveDisplayItemDatas->Contains(this));
sAliveDisplayItemDatas->RemoveEntry(this);
MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas);
nsPtrHashKey<FrameLayerBuilder::DisplayItemData>* entry
= sAliveDisplayItemDatas->GetEntry(this);
MOZ_RELEASE_ASSERT(entry);
sAliveDisplayItemDatas->RemoveEntry(entry);
if (sAliveDisplayItemDatas->Count() == 0) {
delete sAliveDisplayItemDatas;
sAliveDisplayItemDatas = nullptr;