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

Unified Diff: content/browser/ssl/ssl_manager.h

Issue 2869103002: [Android WebView] Propagate Java exceptions thrown in OnReceivedSslError (Closed)
Patch Set: Add comments to ssl_manager.h as well. Created 3 years, 7 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: content/browser/ssl/ssl_manager.h
diff --git a/content/browser/ssl/ssl_manager.h b/content/browser/ssl/ssl_manager.h
index a99dfbd674bfe8372a8a2549ae4a3e6c0fa106ac..f0682f522d6dbb9797516ce3730d1a3d0e2d201a 100644
--- a/content/browser/ssl/ssl_manager.h
+++ b/content/browser/ssl/ssl_manager.h
@@ -91,6 +91,11 @@ class CONTENT_EXPORT SSLManager {
void DidRunContentWithCertErrors(const GURL& security_origin);
// An error occurred with the certificate in an SSL connection.
+ //
+ // On Android, OnCertError can cause a Java exception to be thrown - in such a
+ // case we cannot allow calls back into Java after calling OnCertError. If
+ // adding code calling OnCertError, make sure it cannot call into Java after
+ // returning from OnCertError.
void OnCertError(std::unique_ptr<SSLErrorHandler> handler);
private:
@@ -110,6 +115,11 @@ class CONTENT_EXPORT SSLManager {
// certificate validation (e.g. with HTTP Strict-Transport-Security).
// EXPIRED_PREVIOUS_DECISION indicates whether a user decision had been
// previously made but the decision has expired.
+ //
+ // On Android, OnCertErrorInternal can cause a Java exception to be thrown -
+ // in such a case we cannot allow calls back into Java after calling
+ // OnCertErrorInternal. If adding code calling OnCertErrorInternal, make sure
+ // it cannot call into Java after returning from OnCertErrorInternal.
void OnCertErrorInternal(std::unique_ptr<SSLErrorHandler> handler,
int options_mask);

Powered by Google App Engine
This is Rietveld 408576698