bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

Rework autocomplete code to avoid re-entrancy issues




9 years ago
8 years ago


(Reporter: Gavin, Unassigned)



Firefox Tracking Flags

(Not tracked)


nsAutoCompleteController has been the source of numerous crash bugs, mostly caused by unexpected re-entrancy. Many of the calls into methods on mPopup or mInput potentially end up triggering calls back into the controller, which can in turn clear out member references and screw things up when the stack unwinds. The input also gets cleared out by focus/blur events, which can end up firing while a search is in progress, and the current code doesn't deal with that very gracefully in some cases.

It probably wouldn't be a bad idea for someone to tear down nsAutoCompleteController and build it up again taking these concerns into account (possibly with changes to the input and popup implementations as well), but at the very least we should go through the file and ensure that re-entrancy doesn't cause crashes. Bug 433788 and bug 488311 are examples of current issues in that code.
You need to log in before you can comment on or make changes to this bug.