Run new PasswordForm parser even if old one fails
The old FormData -> PasswordForm parser runs in renderer process, before the data about forms is passed on to the browser process. The new parser runs in browser, after it receives the data from the renderer. For legacy reasons, the FormData (parsing input) is enclosed inside PasswordForm (output) during the inter-process transport. As a result, if the old parser fails to parse completely, the new one has no chance to run at all, because there is no valid PasswordForm to encapsulate its input FormData during the inter-process transport. The important case when this matters is if there are password fields present, but none of them is enabled. The old parser gives up, the new does not care about enabled vs. disabled, so can parse. This CL allows the old parser to produce a minimal PasswordForm if only disabled password fields are present, to allow transporting the FormData to the new parser. In PasswordManager, all these minimal PasswordForms are managed by at most one PasswordFormManager and only used as a fallback, so the functionality of Chrome under the old parser is not affected. Bug: 904908 Change-Id: Idaf569d39884375dc5942dea4349aeec41355c76 Reviewed-on: https://chromium-review.googlesource.com/c/1337497 Commit-Queue: Vaclav Brozek <vabr@chromium.org> Reviewed-by:Vadym Doroshenko <dvadym@chromium.org> Cr-Commit-Position: refs/heads/master@{#609225}
Showing
Please register or sign in to comment