diff options
author | Selim Gurun <sgurun@google.com> | 2012-04-27 10:08:17 -0700 |
---|---|---|
committer | Selim Gurun <sgurun@google.com> | 2012-04-27 10:15:59 -0700 |
commit | 4f8351323b84a7b8c3275e6df8a99a4738fabf45 (patch) | |
tree | 4f8ac1667a0e4ddf0bfc96a58ed55c0595796b2b | |
parent | 8e8529d08429cac48a02b12b41b292bdd697ec53 (diff) | |
download | external_chromium-4f8351323b84a7b8c3275e6df8a99a4738fabf45.zip external_chromium-4f8351323b84a7b8c3275e6df8a99a4738fabf45.tar.gz external_chromium-4f8351323b84a7b8c3275e6df8a99a4738fabf45.tar.bz2 |
Properly clean an exception to prevent a crash
Bug: 6404408
Change-Id: Id9a6e1ff303076da24f0221d3bc905ba0710f07e
-rw-r--r-- | android/net/android_network_library_impl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/android/net/android_network_library_impl.cc b/android/net/android_network_library_impl.cc index 1989621..433ca61 100644 --- a/android/net/android_network_library_impl.cc +++ b/android/net/android_network_library_impl.cc @@ -105,6 +105,11 @@ AndroidNetworkLibraryImpl::VerifyResult } env->DeleteLocalRef(error); } + } else { + // an uncaught exception has happened in java code, clear it and return + // a proper error + env->ExceptionClear(); + result = VERIFY_INVOCATION_ERROR; } // TODO(joth): This balances the GetJNIEnv call; we need to detach as // currently this method is called in chrome from a worker pool thread that |