Skip to content

Commit 6580568

Browse files
committed
Catch broadcast messaging errors.
1 parent 7866f63 commit 6580568

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/bg/RequestGuard.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ var RequestGuard = (() => {
246246
let recipient = {frameId: 0};
247247
for (let tab of await browser.tabs.query({url: ["http://*/*", "https://*/*"]})) {
248248
recipient.tabId = tab.id;
249-
Messages.send("seen", payload, recipient);
249+
try {
250+
Messages.send("seen", payload, recipient);
251+
} catch (e) {
252+
// likely a privileged tab where our content script couldn't run
253+
}
250254
}
251255
}
252256
return;

0 commit comments

Comments
 (0)