Commit bb65dc9f authored by Manas Verma's avatar Manas Verma Committed by Commit Bot

[Autofill Auth] Adding nullptr check in AutofillDriver

Ensuring that neither autofill_manager nor client is null when creating InternalAuthenticator instance.
If either is null, then return nullptr (which is already gracefully handled).

Bug: 949269
Change-Id: I217b7c2766675c5cae7a632acd0db16b1a287b3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324116Reviewed-by: default avatarTommy Martino <tmartino@chromium.org>
Commit-Queue: Manas Verma <manasverma@google.com>
Cr-Commit-Position: refs/heads/master@{#792750}
parent b09b775c
...@@ -109,7 +109,8 @@ bool ContentAutofillDriver::RendererIsAvailable() { ...@@ -109,7 +109,8 @@ bool ContentAutofillDriver::RendererIsAvailable() {
InternalAuthenticator* InternalAuthenticator*
ContentAutofillDriver::GetOrCreateCreditCardInternalAuthenticator() { ContentAutofillDriver::GetOrCreateCreditCardInternalAuthenticator() {
if (!authenticator_impl_) { if (!authenticator_impl_ && autofill_manager_ &&
autofill_manager_->client()) {
authenticator_impl_ = authenticator_impl_ =
autofill_manager_->client()->CreateCreditCardInternalAuthenticator( autofill_manager_->client()->CreateCreditCardInternalAuthenticator(
render_frame_host_); render_frame_host_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment