summaryrefslogtreecommitdiff
path: root/include/ScopedJavaUnicodeString.h
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-08-18 15:02:47 -0400
committerNarayan Kamath <narayan@google.com>2016-09-01 08:16:10 +0000
commitef742f1823504e4166f678d2651cccf16e711b1e (patch)
treef08d9c02794077593897fbab7f60dbbebe692459 /include/ScopedJavaUnicodeString.h
parent6e0b3562646d9b6f64882decf1dd3c65e70e1869 (diff)
Make NativeBN's error-handling more robust.
Functions in OpenSSL/BoringSSL return some result that signals success or failure. NativeBN was using throwExceptionIfNecessary which is almost the same, except: - If BoringSSL has a failure path that forgets to push an exception, it would break. Ideally this wouldn't happen, but there may be cases. - If some other BoringSSL consumer forgets to clear the error queue on failure, it would appear as if a NativeBN operation failed. Instead, consider the result code as the source of truth and change throwExceptionIfNecessary to throwException. Also remove some unused BN_GENCB parameters from JNI functions and tidy error paths up with early returns. Bug: 30917411 Change-Id: I6f73f67d559e5f02f62ed0d7e63b8ae3bf1e56be Test: run cts -c org.apache.harmony.tests.java.math.BigIntegerTest
Diffstat (limited to 'include/ScopedJavaUnicodeString.h')
0 files changed, 0 insertions, 0 deletions