mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 18:39:58 +00:00
Don't check contentTabId/contentFrameId for background shims
This commit is contained in:
@@ -141,11 +141,6 @@ export default new class ShimManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async handleContentMessage (shim: Shim, message: Message) {
|
private async handleContentMessage (shim: Shim, message: Message) {
|
||||||
if (shim.contentTabId === undefined
|
|
||||||
|| shim.contentFrameId === undefined) {
|
|
||||||
throw logger.error("Shim associated with content sender missing tab/frame ID");
|
|
||||||
}
|
|
||||||
|
|
||||||
const [ destination ] = message.subject.split(":/");
|
const [ destination ] = message.subject.split(":/");
|
||||||
if (destination === "bridge") {
|
if (destination === "bridge") {
|
||||||
shim.bridgePort.postMessage(message);
|
shim.bridgePort.postMessage(message);
|
||||||
@@ -166,6 +161,11 @@ export default new class ShimManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "main:/selectReceiverBegin": {
|
case "main:/selectReceiverBegin": {
|
||||||
|
if (shim.contentTabId === undefined
|
||||||
|
|| shim.contentFrameId === undefined) {
|
||||||
|
throw logger.error("Shim associated with content sender missing tab/frame ID");
|
||||||
|
}
|
||||||
|
|
||||||
const contentTab = await browser.tabs.get(shim.contentTabId);
|
const contentTab = await browser.tabs.get(shim.contentTabId);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user