Bug 1615302 - Don't use userTypedValue as the URL to restore when doing a remoteness update through SessionStore. r=alchen,mconley

Differential Revision: https://phabricator.services.mozilla.com/D66705

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matt Woodrow 2020-03-19 22:28:54 +00:00
Родитель abd0620cd9
Коммит 7cf2c4f018
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -305,11 +305,17 @@ ContentRestoreInternal.prototype = {
csp,
};
webNavigation.loadURI(loadArguments.uri, loadURIOptions);
} else if (tabData.userTypedValue && tabData.userTypedClear) {
} else if (
tabData.userTypedValue &&
tabData.userTypedClear &&
!isRemotenessUpdate
) {
// If the user typed a URL into the URL bar and hit enter right before
// we crashed, we want to start loading that page again. A non-zero
// userTypedClear value means that the load had started.
// Load userTypedValue and fix up the URL if it's partial/broken.
// Remoteness updates are not crashes, so we use the provided URL, not
// the user typed one.
let loadURIOptions = {
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP,