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)
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Updated•4 years ago
|
Comment 4•4 years ago
|
||
Backed out for causing bc failures on browser_preferences_usage.js.
| Assignee | ||
Comment 5•4 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•4 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 thegetBoolPrefso 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•4 years ago
|
||
| bugherder | ||
Description
•