Bug 1581903 - Use the frame origin in LMP.onFormSubmit. r=sfoster

Writing a test would be tedious as it involves subframes, password generation and the doorhanger and this change is trivial so I didn't make one. This code will also get rewritten to use BrowsingContexts properly to improve sandboxing shortly.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matthew Noorenberghe 2019-09-24 01:40:45 +00:00
Родитель 52d6534a82
Коммит a76848ab34
1 изменённых файлов: 1 добавлений и 6 удалений

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

@ -597,12 +597,7 @@ this.LoginManagerParent = {
formActionOrigin,
});
let { browsingContext } = browser;
let framePrincipalOrigin =
browsingContext.currentWindowGlobal.documentPrincipal.origin;
let generatedPW = this._generatedPasswordsByPrincipalOrigin.get(
framePrincipalOrigin
);
let generatedPW = this._generatedPasswordsByPrincipalOrigin.get(origin);
let autoSavedStorageGUID = "";
if (generatedPW && generatedPW.storageGUID) {
autoSavedStorageGUID = generatedPW.storageGUID;