aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-04-03 09:53:00 +0100
committerStephen Blott2016-04-04 06:15:52 +0100
commitca89992afd75e98db07e931d9e978f7ed678a137 (patch)
tree034e2f5e8882396f4da1290570e1cc383456d7f1
parentc99af1b7d1d559e54a8849a617920f946ca9bd0b (diff)
downloadvimium-ca89992afd75e98db07e931d9e978f7ed678a137.tar.bz2
Handle all frames the same (for frames/ports).
This is experimental, and may be reverted. I suspect that the special treatment of the top frame may actually be causing problems for global link hints (rather than solving them!).
-rw-r--r--background_scripts/main.coffee6
1 files changed, 1 insertions, 5 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index b9840757..1f6f1c0b 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -293,11 +293,7 @@ Frames =
port.postMessage handler: "registerFrameId", chromeFrameId: frameId
port.onDisconnect.addListener listener = ->
- # Unregister the frame. However, we never unregister the main/top frame. If the tab is navigating to
- # another page, then there'll be a new top frame with the same Id soon. If the tab is closing, then
- # we tidy up in the chrome.tabs.onRemoved listener. This elides any dependency on the order in which
- # events happen (e.g. on navigation, a new top frame registers before the old one unregisters).
- if tabId of frameIdsForTab and frameId != 0
+ if tabId of frameIdsForTab
frameIdsForTab[tabId] = (fId for fId in frameIdsForTab[tabId] when fId != frameId)
if tabId of portsForTab
delete portsForTab[tabId][frameId]