Don't mess with empty float cache lists. Bug 334105, r+sr+branch181=dbaron
This commit is contained in:
@@ -459,11 +459,11 @@ void
|
||||
nsLineBox::FreeFloats(nsFloatCacheFreeList& aFreeList)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(IsInline(), "block line can't have floats");
|
||||
if (IsInline()) {
|
||||
if (mInlineData) {
|
||||
if (IsInline() && mInlineData) {
|
||||
if (mInlineData->mFloats.NotEmpty()) {
|
||||
aFreeList.Append(mInlineData->mFloats);
|
||||
MaybeFreeData();
|
||||
}
|
||||
MaybeFreeData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -850,6 +850,8 @@ nsFloatCacheList::Tail() const
|
||||
void
|
||||
nsFloatCacheList::Append(nsFloatCacheFreeList& aList)
|
||||
{
|
||||
NS_PRECONDITION(aList.NotEmpty(), "Appending empty list will fail");
|
||||
|
||||
nsFloatCache* tail = Tail();
|
||||
if (tail) {
|
||||
NS_ASSERTION(!tail->mNext, "Bogus!");
|
||||
@@ -908,6 +910,8 @@ nsFloatCacheFreeList::~nsFloatCacheFreeList()
|
||||
void
|
||||
nsFloatCacheFreeList::Append(nsFloatCacheList& aList)
|
||||
{
|
||||
NS_PRECONDITION(aList.NotEmpty(), "Appending empty list will fail");
|
||||
|
||||
if (mTail) {
|
||||
NS_ASSERTION(!mTail->mNext, "Bogus");
|
||||
mTail->mNext = aList.mHead;
|
||||
|
||||
Reference in New Issue
Block a user