Chromium Code Reviews| Index: android_webview/native/aw_contents_client_bridge.cc |
| diff --git a/android_webview/native/aw_contents_client_bridge.cc b/android_webview/native/aw_contents_client_bridge.cc |
| index b85568acfba18d76c31d7308ef09d492071de735..64fdbd81ce6ea8863376689403e8cc2420c9236e 100644 |
| --- a/android_webview/native/aw_contents_client_bridge.cc |
| +++ b/android_webview/native/aw_contents_client_bridge.cc |
| @@ -111,6 +111,15 @@ void AwContentsClientBridge::AllowCertificateError( |
| base::MakeUnique<CertErrorCallback>(callback)); |
| *cancel_request = !Java_AwContentsClientBridge_allowCertificateError( |
| env, obj, cert_error, jcert, jurl, request_id); |
| + // TODO bail here, or remove the calback first? |
|
sgurun-gerrit only
2017/05/09 20:29:59
immediately after that, the message loop will abor
gsennton
2017/05/11 12:17:17
Done.
|
| + if (HasException(env)) { |
| + // Tell the chromium message loop to not perform any tasks after the current |
| + // one - we want to make sure we return to Java cleanly without first making |
| + // any new JNI calls. |
| + base::MessageLoopForUI::current()->Abort(); |
| + // If we crashed we don't want to continue the navigation. |
| + return; |
| + } |
| // if the request is cancelled, then cancel the stored callback |
| if (*cancel_request) { |
| pending_cert_error_callbacks_.Remove(request_id); |