Make original patch for bug 99920 (hitting enter in any text field submits form without submit button passed as param)

work in OPT builds, by moving QI() call out of NS_ASSERTION macro.

r=rods@netscape.com  sr=waterson@netscape.com
This commit is contained in:
kin%netscape.com 2001-10-08 14:07:57 +00:00
Родитель 140aa22304
Коммит 8b7fd98bbe
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1940,8 +1940,8 @@ nsFormFrame::GetFirstSubmitButtonAndTxtCnt(PRInt32& aInputTxtCnt)
fcFrame->GetType(&type);
if ((type == NS_FORM_INPUT_SUBMIT || type == NS_FORM_BUTTON_SUBMIT || type == NS_FORM_INPUT_IMAGE) &&
submitFrame == nsnull) {
NS_ASSERTION(fcFrame->QueryInterface(NS_GET_IID(nsIFrame), (void**)&submitFrame) == NS_OK,
"This has to be a frame!");
nsresult rv = fcFrame->QueryInterface(NS_GET_IID(nsIFrame), (void**)&submitFrame);
NS_ASSERTION(NS_SUCCEEDED(rv), "This has to be a frame!");
} else if (type == NS_FORM_INPUT_TEXT || type == NS_FORM_INPUT_PASSWORD) {
aInputTxtCnt++;
}