mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 825786 - crash in nsAutoCompleteController::HandleDelete.
r=Enn
This commit is contained in:
parent
4f18982ee0
commit
8a7a32c2a8
@ -574,7 +574,7 @@ nsAutoCompleteController::HandleDelete(bool *_retval)
|
||||
|
||||
// Complete to the new current value.
|
||||
bool shouldComplete = false;
|
||||
mInput->GetCompleteDefaultIndex(&shouldComplete);
|
||||
input->GetCompleteDefaultIndex(&shouldComplete);
|
||||
if (shouldComplete) {
|
||||
nsAutoString value;
|
||||
if (NS_SUCCEEDED(GetResultValueAt(index, true, value))) {
|
||||
@ -1171,7 +1171,7 @@ nsAutoCompleteController::EnterMatch(bool aIsPopupSelection)
|
||||
popup->GetOverrideValue(value);
|
||||
if (value.IsEmpty()) {
|
||||
bool shouldComplete;
|
||||
mInput->GetCompleteDefaultIndex(&shouldComplete);
|
||||
input->GetCompleteDefaultIndex(&shouldComplete);
|
||||
bool completeSelection;
|
||||
input->GetCompleteSelectedIndex(&completeSelection);
|
||||
|
||||
@ -1376,7 +1376,7 @@ nsAutoCompleteController::PostSearchCleanup()
|
||||
nsCOMPtr<nsIAutoCompleteInput> input(mInput);
|
||||
|
||||
uint32_t minResults;
|
||||
mInput->GetMinResultsForPopup(&minResults);
|
||||
input->GetMinResultsForPopup(&minResults);
|
||||
|
||||
if (mRowCount || minResults == 0) {
|
||||
OpenPopup();
|
||||
@ -1535,6 +1535,7 @@ nsAutoCompleteController::GetDefaultCompleteValue(int32_t aResultIndex,
|
||||
nsresult
|
||||
nsAutoCompleteController::GetFinalDefaultCompleteValue(nsAString &_retval)
|
||||
{
|
||||
MOZ_ASSERT(mInput, "Must have a valid input");
|
||||
nsIAutoCompleteResult *result;
|
||||
int32_t defaultIndex = -1;
|
||||
nsresult rv = GetDefaultCompleteResult(-1, &result, &defaultIndex);
|
||||
@ -1572,6 +1573,7 @@ nsAutoCompleteController::CompleteValue(nsString &aValue)
|
||||
* selectDifference is true, select the remaining portion of aValue not
|
||||
* contained in mSearchString. */
|
||||
{
|
||||
MOZ_ASSERT(mInput, "Must have a valid input");
|
||||
const int32_t mSearchStringLength = mSearchString.Length();
|
||||
int32_t endSelect = aValue.Length(); // By default, select all of aValue.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user