summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2014-12-12 01:25:04 +0100
committerFlorian Bruhin <git@the-compiler.org>2014-12-12 01:38:13 +0100
commit841e31283c035ad2c22c9928ade6b62c0a2568cb (patch)
tree07584705ae92b19bea2f7886120ad97f198f6b1f
parentdecfd020331c2025f15e0e10da3c9e3e68a2281e (diff)
downloadqutebrowser-841e31283c035ad2c22c9928ade6b62c0a2568cb.tar.gz
qutebrowser-841e31283c035ad2c22c9928ade6b62c0a2568cb.zip
hints: Store id() of destroyed frames.
Fixes #305. #152 should still be okay.
-rw-r--r--qutebrowser/browser/hints.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py
index 5f588db17..6a5a84f6b 100644
--- a/qutebrowser/browser/hints.py
+++ b/qutebrowser/browser/hints.py
@@ -58,7 +58,7 @@ class HintContext:
Attributes:
frames: The QWebFrames to use.
- destroyed_frames: QWebFrames which have been destroyed.
+ destroyed_frames: id()'s of QWebFrames which have been destroyed.
(Workaround for https://github.com/The-Compiler/qutebrowser/issues/152)
elems: A mapping from keystrings to (elem, label) namedtuples.
baseurl: The URL of the current page.
@@ -148,7 +148,7 @@ class HintManager(QObject):
pass
for f in self._context.frames:
log.hints.debug("Disconnecting frame {}".format(f))
- if any(e is f for e in self._context.destroyed_frames):
+ if id(f) in self._context.destroyed_frames:
# WORKAROUND for
# https://github.com/The-Compiler/qutebrowser/issues/152
log.hints.debug("Frame has been destroyed, ignoring.")
@@ -661,7 +661,7 @@ class HintManager(QObject):
# WORKAROUND for
# https://github.com/The-Compiler/qutebrowser/issues/152
frame.destroyed.connect(functools.partial(
- self._context.destroyed_frames.append, frame))
+ self._context.destroyed_frames.append, id(frame)))
self._context.args = args
self._init_elements(mainframe, group)
message_bridge = objreg.get('message-bridge', scope='window',