Open Bug 1526372 Opened 2 years ago Updated 2 years ago

urlbarBindings' blur event handler shouldn't import ExtensionSearchHandler.jsm


(Firefox :: Address Bar, task, P3)





(Reporter: florian, Unassigned)



(Keywords: perf, Whiteboard: [fxsearch])

I saw this in a shutdown profile:

The ExtensionSearchHandler field acts as a lazy getter here, and it's unfortunate to trigger it on the blur event handler just to do what looks like some cleanup:

So I think this may be fixed to some extent for QuantumBar by the work going on in bug 1522508.

My best guess without the details of the shutdown profile is that:

  • Firefox was started
  • The address bar was focussed just once
  • Firefox was shutdown

No search was performed in the address bar. This would mean the blur event for the input would be triggered and load the search handler.

In bug 1522508 (specifically D21004), I'm making it so that the cancel call for the ExtensionSearchHandler only happens when there's been a search in the urlbar already.

So, the only case that would then maybe not be covered is:

  • Firefox starts
  • Someone types in the address bar
  • They quit whilst still having the popup open.

I'm not sure that case is worth handling - The only thing we might be able to do later is when we rework the QuantumBar model, the model would be able to get the cancel reason and then send the notification to the ExtensionSearchHandler direct (which would be nicer as then it is all handled within the model).

Depends on: 1522508
Priority: -- → P3
Whiteboard: [fxsearch]
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.