Greasemonkey: add assert to tests scripts_for assumptions.

And crash the users browsing session as a result of any accidental and
totally, otherwise, non-fatal unforseen errors.
This commit is contained in:
Jimmy 2017-11-27 20:07:16 +13:00
parent 0381d74e9a
commit 129f97873a

View File

@ -323,6 +323,8 @@ class BrowserPage(QWebPage):
# also indicate a bug.
log.greasemonkey.debug("Not running scripts for frame with no "
"url: {}".format(frame))
assert not toload, toload
for script in toload:
if frame is self.mainFrame() or script.runs_on_sub_frames:
log.webview.debug('Running GM script: {}'.format(script.name))