Make Firefox gracefully abort when a tab is closed

- This change is only needed for cross-omain scenarios
- This does not work when the entire browser window is closed

#2400