From b616783180346c193360adbe71fda3fef90857cb Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Tue, 9 Nov 1999 13:41:27 +0000 Subject: [PATCH] Fixes MLK 18207 - missing addref, r=beard Fixes Crasher 17852 by temporarily commenting out the offending line, waiting on bug 18183 r=kmcclusk git-svn-id: svn://10.0.0.236/trunk@52994 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsListControlFrame.cpp | 7 +++---- mozilla/layout/html/forms/src/nsListControlFrame.cpp | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/mozilla/layout/forms/nsListControlFrame.cpp b/mozilla/layout/forms/nsListControlFrame.cpp index dde29608077..380c0af89f2 100644 --- a/mozilla/layout/forms/nsListControlFrame.cpp +++ b/mozilla/layout/forms/nsListControlFrame.cpp @@ -1678,9 +1678,9 @@ nsListControlFrame::AddOption(nsIPresContext* aPresContext, PRInt32 aIndex) // this code checks to see if it does // if so then it resets the entire selection of listbox PRBool wasReset = PR_FALSE; - nsIDOMHTMLCollection* options = GetOptions(mContent); + nsCOMPtr options = getter_AddRefs(GetOptions(mContent)); if (options) { - nsIDOMHTMLOptionElement* option = GetOption(*options, aIndex); + nsCOMPtr option = getter_AddRefs(GetOption(*options, aIndex)); if (option) { PRBool selected = PR_FALSE; option->GetDefaultSelected(&selected); @@ -1689,7 +1689,6 @@ nsListControlFrame::AddOption(nsIPresContext* aPresContext, PRInt32 aIndex) //Reset(aPresContext); // this sets mSelectedIndex to the defaulted selection wasReset = PR_TRUE; } - NS_RELEASE(option); } } @@ -1919,7 +1918,7 @@ nsListControlFrame::SetProperty(nsIPresContext* aPresContext, nsIAtom* aName, co ToggleSelected(selectedIndex);// sets mSelectedIndex // Should we send an event here? if (nsnull != mComboboxFrame) { - mComboboxFrame->UpdateSelection(PR_FALSE, PR_TRUE, selectedIndex); // don't dispatch event + // XXX mComboboxFrame->UpdateSelection(PR_FALSE, PR_TRUE, selectedIndex); // don't dispatch event } else { InitSelectionCache(-1); } diff --git a/mozilla/layout/html/forms/src/nsListControlFrame.cpp b/mozilla/layout/html/forms/src/nsListControlFrame.cpp index dde29608077..380c0af89f2 100644 --- a/mozilla/layout/html/forms/src/nsListControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsListControlFrame.cpp @@ -1678,9 +1678,9 @@ nsListControlFrame::AddOption(nsIPresContext* aPresContext, PRInt32 aIndex) // this code checks to see if it does // if so then it resets the entire selection of listbox PRBool wasReset = PR_FALSE; - nsIDOMHTMLCollection* options = GetOptions(mContent); + nsCOMPtr options = getter_AddRefs(GetOptions(mContent)); if (options) { - nsIDOMHTMLOptionElement* option = GetOption(*options, aIndex); + nsCOMPtr option = getter_AddRefs(GetOption(*options, aIndex)); if (option) { PRBool selected = PR_FALSE; option->GetDefaultSelected(&selected); @@ -1689,7 +1689,6 @@ nsListControlFrame::AddOption(nsIPresContext* aPresContext, PRInt32 aIndex) //Reset(aPresContext); // this sets mSelectedIndex to the defaulted selection wasReset = PR_TRUE; } - NS_RELEASE(option); } } @@ -1919,7 +1918,7 @@ nsListControlFrame::SetProperty(nsIPresContext* aPresContext, nsIAtom* aName, co ToggleSelected(selectedIndex);// sets mSelectedIndex // Should we send an event here? if (nsnull != mComboboxFrame) { - mComboboxFrame->UpdateSelection(PR_FALSE, PR_TRUE, selectedIndex); // don't dispatch event + // XXX mComboboxFrame->UpdateSelection(PR_FALSE, PR_TRUE, selectedIndex); // don't dispatch event } else { InitSelectionCache(-1); }