1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 04:26:35 +02:00

Ignore port connection without tab

Fixes #255
This commit is contained in:
kkapsner 2018-09-13 22:50:10 +02:00
parent b0e1e69ec9
commit 456c21cb04
2 changed files with 5 additions and 0 deletions

View file

@ -48,6 +48,10 @@
message("register port listener");
browser.runtime.onConnect.addListener(function(port){
notice("got port", port);
if (!port.sender.tab){
notice("got port without tab = Firefox bug:", port);
return;
}
verbose("send back the tab id", port.sender.tab.id);
verbose("send back the persistent random seeds", persistentRndStorage.persistentRnd);
port.postMessage({