This is the cherry pick merge for the M73 branch which was approved here:

[Autofill Assistant] WebContents null bugfix.

Before this patch we initialized AA and its UI via the webContents from
the currently active tab. A current tab is not immediately set and we
were using a null webContents object.

This patch uses the existing tab instead of a "current" tab instead. AA
no longer crashes when a payment request UI is shown.

Bug: 806868
Issue: b/123338819
Change-Id: Ibf14792b43dcd317f99236bc5368215de8f9f4c1
Reviewed-by: Stephane Zermatten <>
Commit-Queue: Mathias Carlen <>
Cr-Original-Commit-Position: refs/heads/master@{#626470}(cherry picked from commit ba7338d997a445466f014ac3cf827cde8a047a1b)
Cr-Commit-Position: refs/branch-heads/3683@{#90}
Cr-Branched-From: e51029943e0a38dd794b73caaf6373d5496ae783-refs/heads/master@{#625896}
6 files changed