From e19ff7a58ec97de3524a6eb32d5f6e0f57696354 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 15 Mar 2016 16:02:40 +0000 Subject: Tweaks. --- background_scripts/main.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 5135a158..6b845ff1 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -367,7 +367,6 @@ Frames = onConnect: (sender, port) -> [tabId, frameId] = [sender.tab.id, sender.frameId] # We always add frameId 0, the top frame, automatically, and never unregister it. - frameIdsForTab[tabId]? frameIdsForTab[tabId] ?= [0] frameIdsForTab[tabId].push frameId unless frameId == 0 port.postMessage handler: "registerFrameId", chromeFrameId: frameId @@ -376,7 +375,7 @@ Frames = # 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) along soon. If the tab is closing, # then we'll tidy up in the chrome.tabs.onRemoved listener, below. This approach avoids any dependency - # on the order in which register and unregister events happens (on navigation, a new top frame + # on the order in which register and unregister events happens (e.g. on navigation, a new top frame # registering before the old one is deregistered). if tabId of frameIdsForTab and frameId != 0 frameIdsForTab[tabId] = frameIdsForTab[tabId].filter (fId) -> fId != frameId -- cgit v1.2.3