Bug 1406229 fix autocomplete crash in panels when window is closed during event, r=mak

MozReview-Commit-ID: 6TrLuwrk2nD

--HG--
extra : rebase_source : dc6f3dcc13a7fd5063290fdf394d9e7c325441de
This commit is contained in:
Shane Caraveo 2017-10-06 16:58:15 -07:00
Родитель 22d2cdf063
Коммит 49230cedc6
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -367,6 +367,13 @@ nsAutoCompleteController::HandleEnter(bool aIsPopupSelection,
// Stop the search, and handle the enter.
StopSearch();
// StopSearch() can call PostSearchCleanup() which might result
// in a blur event, which could null out mInput, so we need to check it
// again. See bug #408463 for more details
if (!mInput) {
return NS_OK;
}
EnterMatch(aIsPopupSelection, aEvent);
return NS_OK;