diff options
| -rw-r--r-- | background_scripts/main.coffee | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 1f6f1c0b..ab7e881a 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -363,9 +363,11 @@ HintCoordinator = try port.postMessage request catch - # If a frame has gone away, then we remove it from consideration. - tabState[tabId].frameIds = tabState[tabId].frameIds.filter (fId) -> fId != frameId + # A frame has gone away; remove it from consideration. delete @tabState[tabId].ports[frameId] + # It could be that we're expecting hints from this frame; schedule "sending" dummy/empty hints instead. + Utils.nextTick => + @postHintDescriptors tabId, frameId, {hintDescriptors: []} if frameId in tabState[tabId].frameIds # We can delete the tab state when we see an "exit" message, that's the last message in the sequence. delete @tabState[tabId] if messageType == "exit" |
