Speculative fix for permission crash

In some scenarios (which I can't seem to reproduce), the URL we get in
shared.feature_permission is an invalid one.

In that case, we set "urlstr = None", but that means we call message.* with
url=None but option=... set. Since that's invalid usage (we can't set a
per-domain option without knowing the URL) it bails out, causing a crash.
This commit is contained in:
Florian Bruhin 2019-07-22 23:05:27 +02:00
parent e08f3da1e1
commit 068f3ded89
1 changed files with 1 additions and 0 deletions

View File

@ -221,6 +221,7 @@ def feature_permission(url, option, msg, yes_action, no_action, abort_on,
html.escape(url.toDisplayString()), msg)
else:
urlstr = None
option = None # For message.ask/confirm_async
text = "Allow the website to {}?".format(msg)
if blocking: