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

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

Issue 2398733004: Do not SendPasswordForms when LocalFrame is being detached (Closed)
Patch Set: isInStopAllLoaders -> isDetached Created 4 years, 2 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 0397c3b7ffd4a80fb39fcdb8b8133cfcfd24b1ff..194d41976a1e02cd3de627ecf7eddaf54d5fca98 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -946,7 +946,12 @@ void PasswordAutofillAgent::SendPasswordForms(bool only_visible) {
logger->LogBoolean(Logger::STRING_ONLY_VISIBLE, only_visible);
}
- blink::WebFrame* frame = render_frame()->GetWebFrame();
+ blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
+ // RenderFrameObserver::DidFinishLoad() can fire when Frame is
+ // detaching. crbug.com/654654
+ if (frame->isDetached())
+ return;
+
// Make sure that this security origin is allowed to use password manager.
blink::WebSecurityOrigin origin = frame->document().getSecurityOrigin();
if (logger) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698