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

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

Issue 2455053005: Merge 2883: Do not SendPasswordForms when LocalFrame is being detached (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9fdf40e10a981fac41f08c956859399048e1c231 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->isFrameDetachedForSpecialOneOffStopTheCrashingHackBug561873())
+ 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/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698