`GetStrikeDatabase` returns nullptr if web content was destroyed. [chromium/src : main]

0 views
Skip to first unread message

Yishui Liu (Gerrit)

unread,
6:32 PM (2 hours ago) 6:32 PM
to Vinny Persky, Viplav Kadam, Chromium LUCI CQ, chromium...@chromium.org, armalhotra+a...@google.com, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, vinnypersky+...@google.com
Attention needed from Vinny Persky

Yishui Liu voted and added 3 comments

Votes added by Yishui Liu

Commit-Queue+1

3 comments

Patchset-level comments
File-level comment, Patchset 6:
Vinny Persky . resolved

Is it possible to also add a test for this? Just testing that when web_contents() is empty, this returns nullptr

Yishui Liu

test added for testing the empty contents case. Thanks for helping me figure out the test crash issue

Commit Message
Line 7, Patchset 5:Skip payments autofill upstream if there is no web content

With this change `AutofillClient` will return nullptr if the web
content is already destroyed, so that save of Autofill data will not
be offered.
Vinny Persky . resolved

This is not really related to upstream although the crash happens during CVC save. Can we update the title to reflect that this ensures we return nullptr if the web contents isn't present, as there are cases where the strike database is attempted to be retrieved *after* the web contents is destroyed

Yishui Liu

CL description updated.

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Line 669, Patchset 5: // Do not offer save of Autofill data if the `web_contents` is destroyed.
Vinny Persky . resolved

Lets remove this

Yishui Liu

comment removed.

Open in Gerrit

Related details

Attention is currently required from:
  • Vinny Persky
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia486ab98c356e0cc8f3955a63f1bcf1cfb107e0f
Gerrit-Change-Number: 7477247
Gerrit-PatchSet: 17
Gerrit-Owner: Yishui Liu <yis...@google.com>
Gerrit-Reviewer: Vinny Persky <vinny...@google.com>
Gerrit-Reviewer: Viplav Kadam <vipla...@google.com>
Gerrit-Reviewer: Yishui Liu <yis...@google.com>
Gerrit-Attention: Vinny Persky <vinny...@google.com>
Gerrit-Comment-Date: Thu, 15 Jan 2026 23:32:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Vinny Persky <vinny...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Vinny Persky (Gerrit)

unread,
6:33 PM (2 hours ago) 6:33 PM
to Yishui Liu, Viplav Kadam, Chromium LUCI CQ, chromium...@chromium.org, armalhotra+a...@google.com, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, vinnypersky+...@google.com
Attention needed from Yishui Liu

Vinny Persky voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Yishui Liu
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia486ab98c356e0cc8f3955a63f1bcf1cfb107e0f
    Gerrit-Change-Number: 7477247
    Gerrit-PatchSet: 17
    Gerrit-Owner: Yishui Liu <yis...@google.com>
    Gerrit-Reviewer: Vinny Persky <vinny...@google.com>
    Gerrit-Reviewer: Viplav Kadam <vipla...@google.com>
    Gerrit-Reviewer: Yishui Liu <yis...@google.com>
    Gerrit-Attention: Yishui Liu <yis...@google.com>
    Gerrit-Comment-Date: Thu, 15 Jan 2026 23:33:46 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vinny Persky (Gerrit)

    unread,
    6:35 PM (2 hours ago) 6:35 PM
    to Yishui Liu, Viplav Kadam, Chromium LUCI CQ, chromium...@chromium.org, armalhotra+a...@google.com, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, vinnypersky+...@google.com
    Attention needed from Yishui Liu

    Vinny Persky added 2 comments

    File chrome/browser/ui/autofill/chrome_autofill_client.cc
    Line 669, Patchset 17 (Latest): if (web_contents() == nullptr) {
    return nullptr;
    }
    Vinny Persky . unresolved

    turbo nit/optional:

    ```
    if (!web_contents()) {
    return nullptr;
    }
    ```
    File chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc
    Line 404, Patchset 17 (Latest):// Ensure that, when web content is destroyed, `GetStrikeDatabase` will return
    Vinny Persky . unresolved

    web contents

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Yishui Liu
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ia486ab98c356e0cc8f3955a63f1bcf1cfb107e0f
      Gerrit-Change-Number: 7477247
      Gerrit-PatchSet: 17
      Gerrit-Owner: Yishui Liu <yis...@google.com>
      Gerrit-Reviewer: Vinny Persky <vinny...@google.com>
      Gerrit-Reviewer: Viplav Kadam <vipla...@google.com>
      Gerrit-Reviewer: Yishui Liu <yis...@google.com>
      Gerrit-Attention: Yishui Liu <yis...@google.com>
      Gerrit-Comment-Date: Thu, 15 Jan 2026 23:35:40 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Yishui Liu (Gerrit)

      unread,
      6:45 PM (2 hours ago) 6:45 PM
      to Vinny Persky, Viplav Kadam, Chromium LUCI CQ, chromium...@chromium.org, armalhotra+a...@google.com, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, vinnypersky+...@google.com
      Attention needed from Viplav Kadam

      Yishui Liu added 2 comments

      File chrome/browser/ui/autofill/chrome_autofill_client.cc
      Line 669, Patchset 17: if (web_contents() == nullptr) {
      return nullptr;
      }
      Vinny Persky . resolved

      turbo nit/optional:

      ```
      if (!web_contents()) {
      return nullptr;
      }
      ```
      Yishui Liu

      if check updated.

      File chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc
      Line 404, Patchset 17:// Ensure that, when web content is destroyed, `GetStrikeDatabase` will return
      Vinny Persky . resolved

      web contents

      Yishui Liu

      comments updated.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Viplav Kadam
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia486ab98c356e0cc8f3955a63f1bcf1cfb107e0f
        Gerrit-Change-Number: 7477247
        Gerrit-PatchSet: 19
        Gerrit-Owner: Yishui Liu <yis...@google.com>
        Gerrit-Reviewer: Vinny Persky <vinny...@google.com>
        Gerrit-Reviewer: Viplav Kadam <vipla...@google.com>
        Gerrit-Reviewer: Yishui Liu <yis...@google.com>
        Gerrit-Attention: Viplav Kadam <vipla...@google.com>
        Gerrit-Comment-Date: Thu, 15 Jan 2026 23:45:01 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Vinny Persky <vinny...@google.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Viplav Kadam (Gerrit)

        unread,
        6:53 PM (2 hours ago) 6:53 PM
        to Yishui Liu, Vinny Persky, Chromium LUCI CQ, chromium...@chromium.org, armalhotra+a...@google.com, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, vinnypersky+...@google.com
        Attention needed from Yishui Liu

        Viplav Kadam voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Yishui Liu
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia486ab98c356e0cc8f3955a63f1bcf1cfb107e0f
        Gerrit-Change-Number: 7477247
        Gerrit-PatchSet: 19
        Gerrit-Owner: Yishui Liu <yis...@google.com>
        Gerrit-Reviewer: Vinny Persky <vinny...@google.com>
        Gerrit-Reviewer: Viplav Kadam <vipla...@google.com>
        Gerrit-Reviewer: Yishui Liu <yis...@google.com>
        Gerrit-Attention: Yishui Liu <yis...@google.com>
        Gerrit-Comment-Date: Thu, 15 Jan 2026 23:53:42 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages