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
This commit is contained in:
rods%netscape.com
1999-11-09 13:41:27 +00:00
parent f49b0b03e5
commit b616783180
2 changed files with 6 additions and 8 deletions

View File

@@ -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<nsIDOMHTMLCollection> options = getter_AddRefs(GetOptions(mContent));
if (options) {
nsIDOMHTMLOptionElement* option = GetOption(*options, aIndex);
nsCOMPtr<nsIDOMHTMLOptionElement> 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);
}