Fix crash:23193f541b449918 This CL prevents a crash caused by dereferencing a null `WeakPtr` in `CreditCardRiskBasedAuthenticator::OnUnmaskCancelled`. The crash occurs when `OnUnmaskCancelled` is called after the `Requester` object (e.g., `CreditCardAccessManager`) has been deallocated, which can happen during the dismissal flow of UI elements like the Autofill progress dialog. The `requester_` member is a `base::WeakPtr`, and accessing it after the target is destroyed leads to a use-after-free. The fix adds a check to ensure the `requester_` `WeakPtr` is still valid before dereferencing it to call `OnRiskBasedAuthenticationResponseReceived`. This prevents the crash by avoiding the call on a dangling pointer. This issue was observed in crash report crash/23193f541b449918. Bug: 446729816 Change-Id: I271a780a5c7b0653300e60c08bd7d1525248fd0a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6967944 Reviewed-by: Siyu An <siyua@chromium.org> Reviewed-by: Tommy Martino <tmartino@chromium.org> Commit-Queue: Yiwen Qian <yiwenqian@google.com> Cr-Commit-Position: refs/heads/main@{#1519572}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.