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

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

Issue 112203003: Fix renderer crashes when frame gets detached while injectng user scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated patch to latest WebFrame/Frame lifetime changes. Created 6 years, 10 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 81a822ad84d6f5525602acdad47cb59c784ed9a1..25063a748e13a2d355f4644eacae722e034335d7 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -359,7 +359,7 @@ void PasswordAutofillAgent::SendPasswordForms(blink::WebFrame* frame,
bool only_visible) {
// Make sure that this security origin is allowed to use password manager.
blink::WebSecurityOrigin origin = frame->document().securityOrigin();
- if (!OriginCanAccessPasswordManager(origin))
+ if (origin.isNull() || !OriginCanAccessPasswordManager(origin))
return;
// Checks whether the webpage is a redirect page or an empty page.

Powered by Google App Engine
This is Rietveld 408576698