Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: components/autofill/content/renderer/password_autofill_agent.cc

Issue 1960023002: Destroy (Password)AutofillAgent safely (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/content/renderer/password_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index e85a4c27e0c41bfd444e5631ac90675f141c9915..3745a0190a1724250408b40b89e859783acbf6b7 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -1224,6 +1224,10 @@ void PasswordAutofillAgent::WillSubmitForm(const blink::WebFormElement& form) {
}
}
+void PasswordAutofillAgent::OnDestruct() {
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
+}
+
void PasswordAutofillAgent::DidStartProvisionalLoad() {
std::unique_ptr<RendererSavePasswordProgressLogger> logger;
if (logging_state_active_) {

Powered by Google App Engine
This is Rietveld 408576698