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); array->RemoveElement(this);
} }
MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas && sAliveDisplayItemDatas->Contains(this)); MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas);
sAliveDisplayItemDatas->RemoveEntry(this); nsPtrHashKey<FrameLayerBuilder::DisplayItemData>* entry
= sAliveDisplayItemDatas->GetEntry(this);
MOZ_RELEASE_ASSERT(entry);
sAliveDisplayItemDatas->RemoveEntry(entry);
if (sAliveDisplayItemDatas->Count() == 0) { if (sAliveDisplayItemDatas->Count() == 0) {
delete sAliveDisplayItemDatas; delete sAliveDisplayItemDatas;
sAliveDisplayItemDatas = nullptr; sAliveDisplayItemDatas = nullptr;