From 5c4dc22d37e013ec1fb88fa6d02fb2346f2830ec Mon Sep 17 00:00:00 2001 From: "YUKI \"Piro\" Hiroshi" Date: Sat, 18 May 2024 18:09:12 +0900 Subject: [PATCH] Prevent infinite loop on copying a tab with its id as a openerTabId --- common/Context.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/Context.js b/common/Context.js index ee92aba..e0a1fce 100644 --- a/common/Context.js +++ b/common/Context.js @@ -77,6 +77,9 @@ export class Context { try { const collectDescendants = async tab => { + if (tab.openerTabId == tab.id) + return []; + log('collectDescendants: collecting for a tab ', tab); const childTabs = await browser.tabs.query({ windowId: tab.windowId, openerTabId: tab.id,