Investigate never using Private Browsing mode for DevTools iframes
Categories
(DevTools :: General, task, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
Details
See Bug 1581093 for context.
Currently, when DevTools are opened in a private browsing window, the devtools iframe/browser-element runs in private browsing mode. Before, when devtools used an iframe with type=chrome, the docShell was never set to private mode, even if the top window was a private window.
Now that we are using type=content by default, the DevTools frame runs in private browsing mode if the parent window is in private browsing. Since we don't really test this, it exposes us to issues/regressions (Bug 1581093 is a good example of that).
We could try to always run DevTools in non-pb mode. We don't really rely on features that should be impacted by pb mode (see this phabricator comment from :ochameau).
Some pointers from :ochameau on how to tackle this:
I'm wondering if we should force all the DevTools iframes created over here:
https://searchfox.org/mozilla-central/rev/690e903ef689a4eca335b96bd903580394864a1c/devtools/client/framework/toolbox-hosts.js#429-445
to never be running with private browsing flags.One issue I see is, is that we may not be able to force disabling private browsing until the iframe has a DocShell and so is added to the Document.
But once this is done, we can do it like this:
https://searchfox.org/mozilla-central/source/browser/components/BrowserContentHandler.jsm#312-316
And so we may have to do that after we added the iframe to the DOM Tree over here:
https://searchfox.org/mozilla-central/rev/690e903ef689a4eca335b96bd903580394864a1c/devtools/client/framework/toolbox-hosts.js#75
https://searchfox.org/mozilla-central/rev/690e903ef689a4eca335b96bd903580394864a1c/devtools/client/framework/toolbox-hosts.js#165-171
The question is whether embedding a frame with type=content and without privatebrowsing will lead to issues when the topwindow is using privatebrowsing. Cf comment from :smaug
never running in pb mode... maybe, if that doesn't lead to principal mismatches or such.
Updated•3 years ago
|
Description
•