Fix memory leak in AutofillAiAccessManager [chromium/src : main]

0 views
Skip to first unread message

Henrique Nakashima (Gerrit)

unread,
Jun 16, 2026, 4:29:03 PM (12 days ago) Jun 16
to Jihad Hanna, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Jihad Hanna

Henrique Nakashima voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Jihad Hanna
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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
Gerrit-Change-Number: 7950708
Gerrit-PatchSet: 2
Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Comment-Date: Tue, 16 Jun 2026 20:28:53 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Jihad Hanna (Gerrit)

unread,
Jun 16, 2026, 4:53:42 PM (12 days ago) Jun 16
to Henrique Nakashima, Florian Leimgruber, Karol Sygiet, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Henrique Nakashima

Jihad Hanna voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Henrique Nakashima
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
Gerrit-Change-Number: 7950708
Gerrit-PatchSet: 2
Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Florian Leimgruber <fleim...@google.com>
Gerrit-CC: Karol Sygiet <syg...@google.com>
Gerrit-Attention: Henrique Nakashima <hnaka...@chromium.org>
Gerrit-Comment-Date: Tue, 16 Jun 2026 20:53:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Henrique Nakashima (Gerrit)

unread,
Jun 16, 2026, 4:58:05 PM (12 days ago) Jun 16
to Jihad Hanna, Florian Leimgruber, Karol Sygiet, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org

Henrique Nakashima voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
Gerrit-Change-Number: 7950708
Gerrit-PatchSet: 2
Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Florian Leimgruber <fleim...@google.com>
Gerrit-CC: Karol Sygiet <syg...@google.com>
Gerrit-Comment-Date: Tue, 16 Jun 2026 20:57:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Karol Sygiet (Gerrit)

unread,
Jun 17, 2026, 2:22:09 AM (11 days ago) Jun 17
to Henrique Nakashima, Jihad Hanna, Florian Leimgruber, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Henrique Nakashima

Karol Sygiet voted and added 1 comment

Votes added by Karol Sygiet

Code-Review+1

1 comment

Commit Message
Line 18, Patchset 2 (Latest):1. Creating DeviceAuthenticator on demand in Authenticate().
Karol Sygiet . unresolved

In order for the tests to be happy, I think you may need to remove the dependency from [here](https://chromium-review.git.corp.google.com/c/chromium/src/+/7786130/79/chrome/browser/profiles/profile_keyed_service_browsertest.cc)

As this dependency is no longer loaded on startup.

Thanks for fixing this!!

Open in Gerrit

Related details

Attention is currently required from:
  • Henrique Nakashima
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
    Gerrit-Change-Number: 7950708
    Gerrit-PatchSet: 2
    Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
    Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
    Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
    Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
    Gerrit-CC: Florian Leimgruber <fleim...@google.com>
    Gerrit-Attention: Henrique Nakashima <hnaka...@chromium.org>
    Gerrit-Comment-Date: Wed, 17 Jun 2026 06:21:43 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Henrique Nakashima (Gerrit)

    unread,
    Jun 17, 2026, 6:00:50 PM (11 days ago) Jun 17
    to Ryan Sultanem, android-bu...@system.gserviceaccount.com, Karol Sygiet, Jihad Hanna, Florian Leimgruber, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
    Attention needed from Jihad Hanna and Karol Sygiet

    Henrique Nakashima added 1 comment

    Commit Message
    Line 18, Patchset 2:1. Creating DeviceAuthenticator on demand in Authenticate().
    Karol Sygiet . resolved

    In order for the tests to be happy, I think you may need to remove the dependency from [here](https://chromium-review.git.corp.google.com/c/chromium/src/+/7786130/79/chrome/browser/profiles/profile_keyed_service_browsertest.cc)

    As this dependency is no longer loaded on startup.

    Thanks for fixing this!!

    Henrique Nakashima

    Done, thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jihad Hanna
    • Karol Sygiet
    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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
    Gerrit-Change-Number: 7950708
    Gerrit-PatchSet: 3
    Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
    Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
    Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
    Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
    Gerrit-CC: Florian Leimgruber <fleim...@google.com>
    Gerrit-CC: Ryan Sultanem <rs...@google.com>
    Gerrit-Attention: Karol Sygiet <syg...@google.com>
    Gerrit-Attention: Jihad Hanna <jihad...@google.com>
    Gerrit-Comment-Date: Wed, 17 Jun 2026 22:00:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Karol Sygiet <syg...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Henrique Nakashima (Gerrit)

    unread,
    Jun 17, 2026, 6:01:24 PM (11 days ago) Jun 17
    to Hidehiko Abe, Ryan Sultanem, android-bu...@system.gserviceaccount.com, Karol Sygiet, Jihad Hanna, Florian Leimgruber, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
    Attention needed from Hidehiko Abe, Jihad Hanna and Karol Sygiet

    Henrique Nakashima voted Auto-Submit+1

    Auto-Submit+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hidehiko Abe
    • Jihad Hanna
    • Karol Sygiet
    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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
    Gerrit-Change-Number: 7950708
    Gerrit-PatchSet: 3
    Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
    Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
    Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
    Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
    Gerrit-CC: Florian Leimgruber <fleim...@google.com>
    Gerrit-CC: Ryan Sultanem <rs...@google.com>
    Gerrit-Attention: Karol Sygiet <syg...@google.com>
    Gerrit-Attention: Jihad Hanna <jihad...@google.com>
    Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Comment-Date: Wed, 17 Jun 2026 22:01:06 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Henrique Nakashima (Gerrit)

    unread,
    Jun 17, 2026, 6:01:45 PM (11 days ago) Jun 17
    to Hidehiko Abe, Ryan Sultanem, android-bu...@system.gserviceaccount.com, Karol Sygiet, Jihad Hanna, Florian Leimgruber, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
    Attention needed from Hidehiko Abe, Jihad Hanna and Karol Sygiet

    Henrique Nakashima added 1 comment

    Patchset-level comments
    File-level comment, Patchset 3 (Latest):
    Henrique Nakashima . resolved

    + Hidehiko for OWNERS of the test

    Gerrit-Comment-Date: Wed, 17 Jun 2026 22:01:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jihad Hanna (Gerrit)

    unread,
    Jun 17, 2026, 6:35:53 PM (11 days ago) Jun 17
    to Henrique Nakashima, Hidehiko Abe, Ryan Sultanem, android-bu...@system.gserviceaccount.com, Karol Sygiet, Florian Leimgruber, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
    Attention needed from Henrique Nakashima, Hidehiko Abe and Karol Sygiet

    Jihad Hanna voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Henrique Nakashima
    • Hidehiko Abe
    • Karol Sygiet
    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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
      Gerrit-Change-Number: 7950708
      Gerrit-PatchSet: 3
      Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
      Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
      Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
      Gerrit-CC: Florian Leimgruber <fleim...@google.com>
      Gerrit-CC: Ryan Sultanem <rs...@google.com>
      Gerrit-Attention: Henrique Nakashima <hnaka...@chromium.org>
      Gerrit-Attention: Karol Sygiet <syg...@google.com>
      Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Comment-Date: Wed, 17 Jun 2026 22:35:32 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Hidehiko Abe (Gerrit)

      unread,
      Jun 18, 2026, 2:28:18 AM (10 days ago) Jun 18
      to Henrique Nakashima, Jihad Hanna, Ryan Sultanem, android-bu...@system.gserviceaccount.com, Karol Sygiet, Florian Leimgruber, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
      Attention needed from Henrique Nakashima and Karol Sygiet

      Hidehiko Abe added 1 comment

      File chrome/browser/profiles/profile_keyed_service_browsertest.cc
      Line 412, Patchset 3 (Parent): "ChromeDeviceAuthenticator",
      Hidehiko Abe . unresolved

      could you elaborate the background of this removal in the commit message?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Henrique Nakashima
      • Karol Sygiet
      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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
        Gerrit-Change-Number: 7950708
        Gerrit-PatchSet: 3
        Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
        Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
        Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
        Gerrit-CC: Florian Leimgruber <fleim...@google.com>
        Gerrit-CC: Ryan Sultanem <rs...@google.com>
        Gerrit-Attention: Henrique Nakashima <hnaka...@chromium.org>
        Gerrit-Attention: Karol Sygiet <syg...@google.com>
        Gerrit-Comment-Date: Thu, 18 Jun 2026 06:27:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Henrique Nakashima (Gerrit)

        unread,
        Jun 18, 2026, 1:52:52 PM (10 days ago) Jun 18
        to Jihad Hanna, Hidehiko Abe, Ryan Sultanem, android-bu...@system.gserviceaccount.com, Karol Sygiet, Florian Leimgruber, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
        Attention needed from Hidehiko Abe and Karol Sygiet

        Henrique Nakashima voted and added 1 comment

        Votes added by Henrique Nakashima

        Auto-Submit+1

        1 comment

        File chrome/browser/profiles/profile_keyed_service_browsertest.cc
        Line 412, Patchset 3 (Parent): "ChromeDeviceAuthenticator",
        Hidehiko Abe . resolved

        could you elaborate the background of this removal in the commit message?

        Henrique Nakashima

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Hidehiko Abe
        • Karol Sygiet
        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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
          Gerrit-Change-Number: 7950708
          Gerrit-PatchSet: 4
          Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
          Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
          Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
          Gerrit-CC: Florian Leimgruber <fleim...@google.com>
          Gerrit-CC: Ryan Sultanem <rs...@google.com>
          Gerrit-Attention: Karol Sygiet <syg...@google.com>
          Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
          Gerrit-Comment-Date: Thu, 18 Jun 2026 17:52:38 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Hidehiko Abe (Gerrit)

          unread,
          Jun 19, 2026, 2:12:15 AM (9 days ago) Jun 19
          to Henrique Nakashima, Jihad Hanna, Ryan Sultanem, android-bu...@system.gserviceaccount.com, Karol Sygiet, Florian Leimgruber, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
          Attention needed from Henrique Nakashima and Karol Sygiet

          Hidehiko Abe voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Henrique Nakashima
          • Karol Sygiet
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement 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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
          Gerrit-Change-Number: 7950708
          Gerrit-PatchSet: 4
          Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
          Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
          Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
          Gerrit-CC: Florian Leimgruber <fleim...@google.com>
          Gerrit-CC: Ryan Sultanem <rs...@google.com>
          Gerrit-Attention: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Attention: Karol Sygiet <syg...@google.com>
          Gerrit-Comment-Date: Fri, 19 Jun 2026 06:11:48 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Henrique Nakashima (Gerrit)

          unread,
          Jun 19, 2026, 12:13:22 PM (9 days ago) Jun 19
          to Hidehiko Abe, Jihad Hanna, Ryan Sultanem, android-bu...@system.gserviceaccount.com, Karol Sygiet, Florian Leimgruber, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org
          Attention needed from Karol Sygiet

          Henrique Nakashima voted Commit-Queue+2

          Commit-Queue+2
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Karol Sygiet
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement 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: I11a6071b744bdb8574c91dd11e6044645f45ae8e
          Gerrit-Change-Number: 7950708
          Gerrit-PatchSet: 4
          Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
          Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
          Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
          Gerrit-CC: Florian Leimgruber <fleim...@google.com>
          Gerrit-CC: Ryan Sultanem <rs...@google.com>
          Gerrit-Attention: Karol Sygiet <syg...@google.com>
          Gerrit-Comment-Date: Fri, 19 Jun 2026 16:13:06 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          Jun 19, 2026, 12:58:53 PM (9 days ago) Jun 19
          to Henrique Nakashima, Hidehiko Abe, Jihad Hanna, Ryan Sultanem, android-bu...@system.gserviceaccount.com, Karol Sygiet, Florian Leimgruber, chromium...@chromium.org, browser-comp...@chromium.org

          Chromium LUCI CQ submitted the change

          Change information

          Commit message:
          Fix memory leak in AutofillAiAccessManager

          AutofillAiAccessManager was creating a DeviceAuthenticator instance in
          its constructor and keeping it alive for its entire lifetime. On
          Android, DeviceAuthenticator holds a JNI Global Ref to
          DeviceAuthenticatorBridge, which holds the Activity. If WebContents (and
          thus AutofillAiAccessManager) outlived the Activity, the Activity would
          leak.

          Fix this by:


          1. Creating DeviceAuthenticator on demand in Authenticate().
          2. Resetting/destroying it when authentication completes (in the
          callback) or when Reset() is called.
          3. Ensuring it is only reset in Reset() if authentication was actually
          in progress, to avoid destroying mocks injected in tests before
          they are used.
          4. Update `ProfileKeyedServiceGuestBrowserTest` expectation to remove
          `ChromeDeviceAuthenticator`. Previously, `AutofillAiAccessManager`
          instantiated the `DeviceAuthenticator` in its constructor, which
          runs during `BrowserAutofillManager` initialization on startup. By
          moving this instantiation to be lazy, `ChromeDeviceAuthenticator`
          is no longer created on startup, so it must be removed from the
          test's list of expected active services.
          Bug: 517552850
          Change-Id: I11a6071b744bdb8574c91dd11e6044645f45ae8e
          Auto-Submit: Henrique Nakashima <hnaka...@chromium.org>
          Reviewed-by: Jihad Hanna <jihad...@google.com>
          Reviewed-by: Hidehiko Abe <hide...@chromium.org>
          Commit-Queue: Henrique Nakashima <hnaka...@chromium.org>
          Cr-Commit-Position: refs/heads/main@{#1649727}
          Files:
          • M chrome/browser/profiles/profile_keyed_service_browsertest.cc
          • M components/autofill/core/browser/filling/autofill_ai/autofill_ai_access_manager.cc
          Change size: S
          Delta: 2 files changed, 8 insertions(+), 7 deletions(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Jihad Hanna, +1 by Hidehiko Abe
          Open in Gerrit
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: merged
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I11a6071b744bdb8574c91dd11e6044645f45ae8e
          Gerrit-Change-Number: 7950708
          Gerrit-PatchSet: 5
          Gerrit-Owner: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
          Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
          Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
          open
          diffy
          satisfied_requirement
          Reply all
          Reply to author
          Forward
          0 new messages