Bug 1811229 - [devtools] Fix reporting toolbox as a valid browsing context r=devtools-reviewers,jdescottes

remote=true wasn't quite the right check here.
This workaround here is rather around chrome <=> content boundaries.
When we load a URL that loads in the parent process (like about:devtools-toolbox),
this ignores remote=true and loads in parent, but type="content"
is still enforced and still prevent it from being listed in BrowsingContext.children.

Because of this the about:devtools-toolbox wasn't visible in the storage panel.

Differential Revision: https://phabricator.services.mozilla.com/D166659
This commit is contained in:
Alexandre Poirot 2023-01-19 17:16:33 +00:00
Родитель 897c6495ad
Коммит ec1c1ce4c1
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -367,7 +367,7 @@ export function getAllBrowsingContextsForContext(
// so we have to cross these boundaries by ourself.
// (This is also the reason why we aren't using BrowsingContext.getAllBrowsingContextsInSubtree())
for (const browser of browsingContext.window.document.querySelectorAll(
`browser[remote="true"]`
`browser[type="content"]`
)) {
walk(browser.browsingContext);
}