Bug 1141089 - Add some release assertions to gather more data. r=roc

--HG--
extra : rebase_source : 1575191a4bf2ebebb3e15fc82ac3c2addffa67d6
This commit is contained in:
Markus Stange 2015-03-16 16:04:00 -04:00
Родитель 4c35fb53bc
Коммит 235900b2b8
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -94,6 +94,7 @@ FrameLayerBuilder::DisplayItemData::AddFrame(nsIFrame* aFrame)
void
FrameLayerBuilder::DisplayItemData::RemoveFrame(nsIFrame* aFrame)
{
MOZ_RELEASE_ASSERT(mLayer);
DebugOnly<bool> result = mFrameList.RemoveElement(aFrame);
NS_ASSERTION(result, "Can't remove a frame that wasn't added!");
@ -106,6 +107,7 @@ FrameLayerBuilder::DisplayItemData::RemoveFrame(nsIFrame* aFrame)
void
FrameLayerBuilder::DisplayItemData::EndUpdate()
{
MOZ_RELEASE_ASSERT(mLayer);
MOZ_ASSERT(!mItem);
mIsInvalid = false;
mUsed = false;
@ -114,6 +116,7 @@ FrameLayerBuilder::DisplayItemData::EndUpdate()
void
FrameLayerBuilder::DisplayItemData::EndUpdate(nsAutoPtr<nsDisplayItemGeometry> aGeometry)
{
MOZ_RELEASE_ASSERT(mLayer);
MOZ_ASSERT(mItem);
mGeometry = aGeometry;
@ -129,6 +132,7 @@ FrameLayerBuilder::DisplayItemData::BeginUpdate(Layer* aLayer, LayerState aState
uint32_t aContainerLayerGeneration,
nsDisplayItem* aItem /* = nullptr */)
{
MOZ_RELEASE_ASSERT(aLayer);
mLayer = aLayer;
mOptLayer = nullptr;
mInactiveManager = nullptr;
@ -1187,6 +1191,8 @@ FrameLayerBuilder::GetDisplayItemData(nsIFrame* aFrame, uint32_t aKey)
if (array) {
for (uint32_t i = 0; i < array->Length(); i++) {
DisplayItemData* item = array->ElementAt(i);
MOZ_RELEASE_ASSERT(item);
MOZ_RELEASE_ASSERT(item->mLayer);
if (item->mDisplayItemKey == aKey &&
item->mLayer->Manager() == mRetainingManager) {
return item;