Commit 6b79cf6f authored by Nektarios Paisios's avatar Nektarios Paisios Committed by Commit Bot

Revert "Reland: Fix a leak of a document that is held by AutofillAgent"

This reverts commit d49a7750.

Reason for revert: Very likely broke PasswordManagerBrowserTestBase.PasswordOverridenUpdateBubbleShown in browser_tests 

Original change's description:
> Reland: Fix a leak of a document that is held by AutofillAgent
> 
> This CL is just relanding https://chromium-review.googlesource.com/c/chromium/src/+/597482,
> after confirming that there are no statistical significant regressions
> in the real world by Finch experiments (crbug.com/755489).
> 
> Note that this might still cause Telemetry regressions reported at
> crbug.com/753071 before, but this is expected.
> 
> A document is leaked because AutofillAgent hold a lastly used element
> even after navigation happens, and the document of the element remains
> until a new (input) element is focused. This CL fixes this issue by
> resetting the element in AutofillAgent when navigation happens.
> 
> Bug: 734427, 755489
> Change-Id: Ie3ee7f202abf56e22102e3d7f68cf2778f85ca87
> Reviewed-on: https://chromium-review.googlesource.com/908371
> Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
> Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Reviewed-by: Evan Stade <estade@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#539105}

TBR=estade@chromium.org,hajimehoshi@chromium.org,haraken@chromium.org,kouhei@chromium.org

Change-Id: Ibe5a7c4d6c35c19bd1ff1140fc0f9afcbb4fea10
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 734427, 755489
Reviewed-on: https://chromium-review.googlesource.com/937762Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539163}
parent 19649690
...@@ -192,7 +192,16 @@ void AutofillAgent::DidCommitProvisionalLoad(bool is_new_navigation, ...@@ -192,7 +192,16 @@ void AutofillAgent::DidCommitProvisionalLoad(bool is_new_navigation,
return; return;
// Navigation to a new page or a page refresh. // Navigation to a new page or a page refresh.
element_.Reset();
// Do Finch testing to see how much regressions are caused by this leak fix
// (crbug/753071).
std::string group_name =
base::FieldTrialList::FindFullName("FixDocumentLeakInAutofillAgent");
if (base::StartsWith(group_name, "enabled",
base::CompareCase::INSENSITIVE_ASCII)) {
element_.Reset();
}
form_cache_.Reset(); form_cache_.Reset();
ResetLastInteractedElements(); ResetLastInteractedElements();
OnFormNoLongerSubmittable(); OnFormNoLongerSubmittable();
......
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