Skip to content
Snippets Groups Projects
Verified Commit 9d6ca8ac authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.

Collect the browsers also on Android.
parent 410b9a4c
1 merge request!864Bug 42247: Tor integration changes for Android that affect also desktop
......@@ -475,9 +475,19 @@ class TorDomainIsolatorImpl {
* @returns {MozBrowser?} The browser the channel is associated to
*/
#getBrowserForChannel(channel) {
const currentBrowser =
channel.loadInfo.browsingContext?.topChromeWindow?.browser;
if (
channel.loadInfo.browsingContext &&
currentBrowser?.browsingContext === channel.loadInfo.browsingContext
) {
// Android has only one browser, and does not have the browsers property.
return currentBrowser;
}
const browsers =
channel.loadInfo.browsingContext?.topChromeWindow?.gBrowser?.browsers;
if (!browsers || !channel.loadInfo.browsingContext?.browserId) {
logger.debug("Missing data to associate to a browser", channel.loadInfo);
return null;
}
for (const browser of browsers) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment