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).