Bug 416510 - "nsSliderFrame should use nsCOMPtr for its mMediator" [p=kayjay@poczta.fm (kayjay) r+sr=roc a1.9=schrep]

This commit is contained in:
reed@reedloden.com 2008-02-13 02:41:23 -08:00
parent e7b97c3e18
commit ca7d34dbff
2 changed files with 2 additions and 5 deletions

View File

@ -95,8 +95,7 @@ nsSliderFrame::nsSliderFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
nsBoxFrame(aPresShell, aContext),
mCurPos(0),
mScrollbarListener(nsnull),
mChange(0),
mMediator(nsnull)
mChange(0)
{
}
@ -955,7 +954,6 @@ nsSliderFrame::AddListener()
{
if (!mMediator) {
mMediator = new nsSliderMediator(this);
NS_ADDREF(mMediator);
}
nsIFrame* thumbFrame = mFrames.FirstChild();
@ -1027,7 +1025,6 @@ nsSliderFrame::Destroy()
// tell our mediator if we have one we are gone.
if (mMediator) {
mMediator->SetSlider(nsnull);
NS_RELEASE(mMediator);
mMediator = nsnull;
}

View File

@ -242,7 +242,7 @@ private:
nscoord mChange;
nsPoint mDestinationPoint;
nsSliderMediator* mMediator;
nsRefPtr<nsSliderMediator> mMediator;
static PRBool gMiddlePref;
static PRInt32 gSnapMultiplier;