PasswordAutofillAgent: do not store NULL key in provisionally_saved_forms_
PasswordAutofillAgent::provisionally_saved_forms_ is currently queried for forms associated to WebFrame pointers by passing that pointer to the map directly through [] operator. This operator creates a key-value pair as a side effect. Moreover, at once place, this pointer can be NULL. As a result, the map gets sometimes populated with entries having a NULL key, which is later dereferenced.
This CL does 2 things:
(1) Changes code testing whether the map contains a WebFrame* so that no new entries are added to the map by such test.
(2) Eliminates the use of NULL as key in PasswordAutofillAgent::DidStartProvisionalLoad
This CL lacks tests, because although the NULL-dereference already happened in the wild, it is not clear how to reproduce that. The tests will be hopefully added as investigating progresses, but this CL should land first to stop the crashes.
BUG=420519
Review URL: https://codereview.chromium.org/
630083002
Cr-Commit-Position: refs/heads/master@{#298450}