Closed Bug 849561 Opened 11 years ago Closed 6 years ago

Blank results in the address bar/autocomplete pop-up.

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: ukarz.l, Unassigned)

Details

Attachments

(1 file)

Attached image addressbar_bug.png
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0
Build ID: 20130215130331

Steps to reproduce:

I wrote a Firefox plug-in which integrates with the address bar. It's a custom "autocomplete" search engine.


Actual results:

Sometimes the address bar shows empty results in the autocomplete pop-up.


Expected results:

There shouldn't be any empty result in the autocomplete pop-up. It seems that there is a bug in the ProcessResult method in the file toolkit/components/autocomplete/nsAutoCompleteController.cpp.

Fix proposal:
nsAutoCompleteController.cpp, line 1296:
  if (resultIndex == -1) {
    // cache the result
    mResults.AppendObject(aResult);
    mMatchCounts.AppendElement(matchCount);
    resultIndex = mResults.Count() - 1;
  }
  else {
    oldMatchCount = mMatchCounts[aSearchIndex]; -> oldMatchCount = mMatchCounts[resultIndex];
    mMatchCounts[resultIndex] = matchCount;
  }
Component: Untriaged → Location Bar
OS: Linux → All
Hardware: x86_64 → All
Summary: The nsAutoCompleteController.cpp is in invalid state when the same search engine updates its results. → Blank results in the address bar/autocomplete pop-up.
I suspect it's related to bug 720589.
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: