mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1156108 - Make nsTreeColumns::mFirstColumn an nsRefPtr; r=roc
This commit is contained in:
parent
ffad0ee63d
commit
f9324092a8
@ -393,8 +393,7 @@ nsTreeColumn::Invalidate(mozilla::ErrorResult& aRv)
|
||||
}
|
||||
|
||||
nsTreeColumns::nsTreeColumns(nsTreeBodyFrame* aTree)
|
||||
: mTree(aTree),
|
||||
mFirstColumn(nullptr)
|
||||
: mTree(aTree)
|
||||
{
|
||||
}
|
||||
|
||||
@ -669,7 +668,7 @@ nsTreeColumns::InvalidateColumns()
|
||||
currCol = currCol->GetNext()) {
|
||||
currCol->SetColumns(nullptr);
|
||||
}
|
||||
NS_IF_RELEASE(mFirstColumn);
|
||||
mFirstColumn = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -759,7 +758,7 @@ nsTreeColumns::EnsureColumns()
|
||||
col->SetPrevious(currCol);
|
||||
}
|
||||
else {
|
||||
NS_ADDREF(mFirstColumn = col);
|
||||
mFirstColumn = col;
|
||||
}
|
||||
currCol = col;
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ private:
|
||||
* XXX this means that new nsTreeColumn objects are unnecessarily created
|
||||
* for untouched columns.
|
||||
*/
|
||||
nsTreeColumn* mFirstColumn;
|
||||
nsRefPtr<nsTreeColumn> mFirstColumn;
|
||||
};
|
||||
|
||||
#endif // nsTreeColumns_h__
|
||||
|
Loading…
Reference in New Issue
Block a user