Bug 519478 - UMR in nsAutoCompleteController::ClosePopup. r=gavin.sharp

This commit is contained in:
Justin Dolske 2009-10-04 23:46:25 -07:00
parent be5fce4aec
commit 2776d8d6f2
2 changed files with 6 additions and 4 deletions

View File

@ -328,7 +328,7 @@ nsAutoCompleteController::HandleStartComposition()
// Stop all searches in case they are async.
StopSearch();
PRBool isOpen;
PRBool isOpen = PR_FALSE;
input->GetPopupOpen(&isOpen);
if (isOpen)
ClosePopup();
@ -404,7 +404,7 @@ nsAutoCompleteController::HandleKeyNavigation(PRUint32 aKey, PRBool *_retval)
// the cursor to home/end on some systems
*_retval = PR_TRUE;
PRBool isOpen;
PRBool isOpen = PR_FALSE;
input->GetPopupOpen(&isOpen);
if (isOpen) {
PRBool reverse = aKey == nsIDOMKeyEvent::DOM_VK_UP ||
@ -478,7 +478,7 @@ nsAutoCompleteController::HandleKeyNavigation(PRUint32 aKey, PRBool *_retval)
)
{
// The user hit a text-navigation key.
PRBool isOpen;
PRBool isOpen = PR_FALSE;
input->GetPopupOpen(&isOpen);
if (isOpen) {
PRInt32 selectedIndex;
@ -949,7 +949,7 @@ nsAutoCompleteController::ClosePopup()
return NS_OK;
}
PRBool isOpen;
PRBool isOpen = PR_FALSE;
mInput->GetPopupOpen(&isOpen);
if (!isOpen)
return NS_OK;

View File

@ -199,6 +199,8 @@ nsFormFillController::GetPopupOpen(PRBool *aPopupOpen)
{
if (mFocusedPopup)
mFocusedPopup->GetPopupOpen(aPopupOpen);
else
*aPopupOpen = PR_FALSE;
return NS_OK;
}