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

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 2344943002: Make ChromePasswordManagerClient::BindCredentialManager handle missing client gracefully (Closed)
Patch Set: Make ChromePasswordManagerClient::BindCredentialManager handle missing client gracefully Created 4 years, 3 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 | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/chrome_password_manager_client.cc
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index 31f1893633e9844a030c376eb2034d0de243dc1f..437ae9f877711bc8c2521f9619f7ab9344dbbcf0 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -636,6 +636,12 @@ void ChromePasswordManagerClient::BindCredentialManager(
ChromePasswordManagerClient* instance =
ChromePasswordManagerClient::FromWebContents(web_contents);
- DCHECK(instance);
+
+ // Try to bind to the driver, but if driver is not available for this render
+ // frame host, the request will be just dropped. This will cause the message
+ // pipe to be closed, which will raise a connection error on the peer side.
+ if (!instance)
+ return;
+
instance->credential_manager_impl_.BindRequest(std::move(request));
}
« no previous file with comments | « no previous file | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698