diff --git a/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp b/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp index 506722f92cdd..5371619caf65 100644 --- a/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp +++ b/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp @@ -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; diff --git a/toolkit/components/satchel/src/nsFormFillController.cpp b/toolkit/components/satchel/src/nsFormFillController.cpp index e135783370c3..dec130dcdc28 100644 --- a/toolkit/components/satchel/src/nsFormFillController.cpp +++ b/toolkit/components/satchel/src/nsFormFillController.cpp @@ -199,6 +199,8 @@ nsFormFillController::GetPopupOpen(PRBool *aPopupOpen) { if (mFocusedPopup) mFocusedPopup->GetPopupOpen(aPopupOpen); + else + *aPopupOpen = PR_FALSE; return NS_OK; }