зеркало из https://github.com/mozilla/pjs.git
Bug 396982. Location bar autocomplete leaks. Patch by Nickolay Ponomarev <asqueella@gmail.com>. r=sspitzer/sayrer, a=mconnor
This commit is contained in:
Родитель
dbda8b5d76
Коммит
5635e216cb
|
@ -591,6 +591,7 @@ protected:
|
|||
nsresult PerformAutoComplete();
|
||||
nsresult StartAutoCompleteTimer(PRUint32 aMilliseconds);
|
||||
static void AutoCompleteTimerCallback(nsITimer* aTimer, void* aClosure);
|
||||
void DoneSearching();
|
||||
|
||||
PRInt32 mExpireDays;
|
||||
|
||||
|
|
|
@ -241,8 +241,17 @@ nsNavHistory::PerformAutoComplete()
|
|||
mCurrentChunkEndTime -= AUTOCOMPLETE_SEARCH_CHUNK;
|
||||
rv = StartAutoCompleteTimer(AUTOCOMPLETE_SEARCH_TIMEOUT);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else {
|
||||
DoneSearching();
|
||||
}
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsNavHistory::DoneSearching()
|
||||
{
|
||||
mCurrentResult = nsnull;
|
||||
mCurrentListener = nsnull;
|
||||
}
|
||||
|
||||
// nsNavHistory::StartSearch
|
||||
|
@ -412,7 +421,7 @@ nsNavHistory::StopSearch()
|
|||
mAutoCompleteTimer->Cancel();
|
||||
|
||||
mCurrentSearchString.Truncate();
|
||||
mCurrentListener = nsnull;
|
||||
DoneSearching();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче