From ca89992afd75e98db07e931d9e978f7ed678a137 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 3 Apr 2016 09:53:00 +0100 Subject: 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!). --- background_scripts/main.coffee | 6 +----- 1 file changed, 1 insertion(+), 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] -- cgit v1.2.3