Backport popup related ASan crash fix to Tor Browser 6.x
It turns out that one of the crashes I found with ASan got already reported a couple of days earlier and fixed on trunk. The security rating indicates that Mozilla won't backport that patch to ESR 45. But we should do for safety's sake.