urlbarBindings' blur event handler shouldn't import ExtensionSearchHandler.jsm
Categories
(Firefox :: Address Bar, task, P5)
Tracking
()
People
(Reporter: florian, Unassigned)
References
Details
(Keywords: perf, Whiteboard: [fxsearch])
I saw this in a shutdown profile: https://perfht.ml/2DjIDEb
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: https://searchfox.org/mozilla-central/rev/03ebbdab952409640c6857d835d3040bf6f9e2db/browser/base/content/urlbarBindings.xml#1794-1796
Comment 1•5 years ago
|
||
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).
Updated•5 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
Description
•