Bug 1755742 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

When restoring tabs via session store and switching to those lazy loading tabs, we fire an `onSecurityChange` which flags includes `STATE_HTTPS_ONLY_MODE_UPGRADED`. This is unexpected, because HTTPS only mode is disabled.

When debugging I found that that we end up with `httpsOnlyStatus == 0` here:
https://searchfox.org/mozilla-central/rev/69a482382823f42f482e840f65725218d7654cc4/security/manager/ssl/nsSecureBrowserUI.cpp#94-98 which sets this flag.  Is `0` a valid state for `httpsOnlyStatus`?

I've found this issue while debugging Bug 1746383. In the video attached here https://bugzilla.mozilla.org/show_bug.cgi?id=1746383#c4 you can see that the identity panel is showing the https-only-mode UI. This may be unexpected.

You can reproduce this issue by setting Firefox to restore tabs on startup, and setting a breakpoint here, observing the `aState` field: https://searchfox.org/mozilla-central/rev/3de1b6791ea569cdf7773f7cd512cf2e6cc1d3f0/browser/base/content/browser.js#5599
When restoring tabs via session store and switching to those lazy loading tabs, we fire an `onSecurityChange` which flags includes `STATE_HTTPS_ONLY_MODE_UPGRADED`. This is unexpected, because HTTPS only mode is disabled.

When debugging I found that that we end up with `httpsOnlyStatus == 0` here:
https://searchfox.org/mozilla-central/rev/69a482382823f42f482e840f65725218d7654cc4/security/manager/ssl/nsSecureBrowserUI.cpp#94-98 which sets this flag.  Is `0` a valid state for `httpsOnlyStatus`?

I've found this issue while debugging Bug 1746383. In the video attached here https://bugzilla.mozilla.org/show_bug.cgi?id=1746383#c4 you can see that the identity panel is showing the https-only-mode UI. This may be unexpected.

You can reproduce this issue by setting Firefox to restore tabs on startup, and setting a breakpoint here, observing the `aState` field: https://searchfox.org/mozilla-central/rev/3de1b6791ea569cdf7773f7cd512cf2e6cc1d3f0/browser/base/content/browser.js#5599
and switching to one of the restored tab that wasn't selected initially.

Back to Bug 1755742 Comment 0