(tabId, frameId, tabRemoved)
| 78 | } |
| 79 | |
| 80 | export function clearNotifications(tabId, frameId, tabRemoved) { |
| 81 | for (const nid in openers) { |
| 82 | const op = openers[nid]; |
| 83 | if (isObject(op) |
| 84 | && op.tab.id === tabId |
| 85 | && (!frameId || op[kFrameId] === frameId) |
| 86 | && !op[kZombie]) { |
| 87 | if (op[kZombieTimeout]) { |
| 88 | op[kZombie] = setTimeout(removeNotification, op[kZombieTimeout], nid); |
| 89 | if (!op[kZombieUrl]) openers[nid] = op[kZombie]; |
| 90 | if (tabRemoved) op._removed = true; |
| 91 | } else { |
| 92 | removeNotification(nid); |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | function clearZombieTimer(op) { |
| 99 | if (op > 0) clearTimeout(op); |
no test coverage detected