Investigate exception in 81
From !1 (2f17f871, comment 2707272).
# In 81, marionette.get_url() sometimes fails with:
# `UnknownException: TypeError: browsingContext.currentWindowGlobal is null`
# It happens when clicking "Always Prioritize Onions" in the doorhanger:
# opens a new tab + refreshes the previous one, then when we close the new tab
# and move to the old one, marionette.get_url() throws the error.
# Until a proper fix, this workaround seems to work fine.
If there isn't a clear reason for this happening, maybe the solution should be #40006.