Commit 7e6d4055 authored by sgurun@chromium.org's avatar sgurun@chromium.org

Reinforce destruction path in awcontentsclientbridge.

Do not try to access native objects without making sure they are available.

BUG=

Review URL: https://codereview.chromium.org/267963002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268031 0039d316-1c4b-4281-b951-d872f2087c98
parent 0ede7cc5
...@@ -147,6 +147,7 @@ public class AwContentsClientBridge { ...@@ -147,6 +147,7 @@ public class AwContentsClientBridge {
} }
private void provideResponse(AndroidPrivateKey androidKey, byte[][] certChain) { private void provideResponse(AndroidPrivateKey androidKey, byte[][] certChain) {
if (mNativeContentsClientBridge == 0) return;
nativeProvideClientCertificateResponse(mNativeContentsClientBridge, mId, nativeProvideClientCertificateResponse(mNativeContentsClientBridge, mId,
certChain, androidKey); certChain, androidKey);
} }
...@@ -197,6 +198,7 @@ public class AwContentsClientBridge { ...@@ -197,6 +198,7 @@ public class AwContentsClientBridge {
@CalledByNative @CalledByNative
protected void selectClientCertificate(final int id, final String[] keyTypes, protected void selectClientCertificate(final int id, final String[] keyTypes,
byte[][] encodedPrincipals, final String host, final int port) { byte[][] encodedPrincipals, final String host, final int port) {
assert mNativeContentsClientBridge != 0;
ClientCertLookupTable.Cert cert = mLookupTable.getCertData(host, port); ClientCertLookupTable.Cert cert = mLookupTable.getCertData(host, port);
if (mLookupTable.isDenied(host, port)) { if (mLookupTable.isDenied(host, port)) {
nativeProvideClientCertificateResponse(mNativeContentsClientBridge, id, nativeProvideClientCertificateResponse(mNativeContentsClientBridge, id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment