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

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

Issue 380533003: Flush form cache when next document is loaded to avoid Document leak. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseline Created 6 years, 5 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/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index 1ec89c53e0ca304245498049c4c37d6b75228806..714159a86af5e46fbf1474655bf1b9165201856a 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -181,6 +181,11 @@ void AutofillAgent::DidFinishDocumentLoad(WebLocalFrame* frame) {
ProcessForms(*frame);
}
+void AutofillAgent::DidCommitProvisionalLoad(WebLocalFrame* frame,
+ bool is_new_navigation) {
+ form_cache_.ResetFrame(*frame);
+}
+
void AutofillAgent::FrameDetached(WebFrame* frame) {
form_cache_.ResetFrame(*frame);
}

Powered by Google App Engine
This is Rietveld 408576698