Closed Bug 1624661 Opened 1 year ago Closed 1 year ago

Race condition in autocompletion when there's text after the completed word

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(firefox78 fixed)

RESOLVED FIXED
Firefox 78
Tracking Status
firefox78 --- fixed

People

(Reporter: julienw, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

I found another occurrence of the problem described and fixed in bug 1595068 and bug 1600680.

STR:

  1. open the console.
  2. Start to enter f(null), but press enter before the end of "null", when the autocomplete appears.
    => nnull is added most of the time.
    The same happens with other things. For example I tried with window too (wwindow is added). This also seems to happen more easily when replacing the parameter instead of adding it.

Thanks for the report Julien, I do reproduce this, let's see what's happening

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Summary: Another race condition with autocompletion → Race condition in autocompletion when there's text after the completed word

When the completed word has character after it,
we don't display the completion text (the grey
text that indicates what will be added to the
input if you press enter), and we keep the autocomplete
popup open, even if there's only one item in it.
But in the code where we're mitigating races on
autocompletion, we were having a check on the completionText
existence, which would not cover the cases where the
popup is shown but not the completion text.
By changing the condition in the if, the issue is fixed.
A test case is added to ensure this works as expected
and that we don't regress.

Severity: normal → S2
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39fb36ae22fe
Fix race condition in console autocomplete. r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78
You need to log in before you can comment on or make changes to this bug.