Allow BrowserTestUtils to handle https-first upgraded loads
Categories
(Core :: DOM: Security, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox93 | --- | fixed |
People
(Reporter: ckerschb, Assigned: ckerschb)
References
(Blocks 1 open bug)
Details
(Whiteboard: [domsecurity-active])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Backed out for causing bc failures on browser_preferences_usage.js.
Assignee | ||
Comment 5•3 years ago
|
||
Gijs, do you think it would just work if we refactor the code to do something like if (wantLoad.startsWith("http://")
and then nested within that if we do the getBoolPref
so the pref is queried less often? As far as I can tell this is why the patch was backed out, because the pref is accessed too many times - or is there a better alternative in JS to cache the pref value?
Comment 6•3 years ago
|
||
(In reply to Christoph Kerschbaumer [:ckerschb] from comment #5)
Gijs, do you think it would just work if we refactor the code to do something like
if (wantLoad.startsWith("http://")
and then nested within that if we do thegetBoolPref
so the pref is queried less often? As far as I can tell this is why the patch was backed out, because the pref is accessed too many times - or is there a better alternative in JS to cache the pref value?
XPCOMUtils.defineLazyPreferenceGetter(
BrowserTestUtils,
"_httpsFirstEnabled",
"dom.security.https_first",
false
);
after the definition of BrowserTestUtils
in the jsm.
Then just check if (BrowserTestUtils._httpsFirstEnabled && wantLoad.startsWith("http://"))
in the isWanted
function.
Comment 8•3 years ago
|
||
bugherder |
Description
•