mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1156108 - Make nsTreeColumns::mFirstColumn an nsRefPtr; r=roc
This commit is contained in:
parent
053efd7a2b
commit
d871ed2e61
@ -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