diff options
Diffstat (limited to 'layout')
-rw-r--r-- | layout/base/FrameLayerBuilder.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index e87d9dc09e..934d108e0b 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -272,8 +272,13 @@ FrameLayerBuilder::DisplayItemData::~DisplayItemData() array->RemoveElement(this); } - MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas && sAliveDisplayItemDatas->Contains(this)); - sAliveDisplayItemDatas->RemoveEntry(this); + MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas); + nsPtrHashKey<mozilla::FrameLayerBuilder::DisplayItemData>* entry + = sAliveDisplayItemDatas->GetEntry(this); + MOZ_RELEASE_ASSERT(entry); + + sAliveDisplayItemDatas->RemoveEntry(entry); + if (sAliveDisplayItemDatas->Count() == 0) { delete sAliveDisplayItemDatas; sAliveDisplayItemDatas = nullptr; |