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

Unified Diff: net/cert/x509_util_android.cc

Issue 2053413002: Roll base to ec59756cc1ad02cc835bcca10056a621c9eb346c. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « net/android/gurl_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_util_android.cc
diff --git a/net/cert/x509_util_android.cc b/net/cert/x509_util_android.cc
index e3496b2db30ded757c7d798917eeec94e6095468..9648ffb91f09b39058059eca555d50c7f0298459 100644
--- a/net/cert/x509_util_android.cc
+++ b/net/cert/x509_util_android.cc
@@ -27,8 +27,12 @@ void RecordCertVerifyCapabilitiesHistogram(JNIEnv* env,
}
}
-jobject GetApplicationContext(JNIEnv* env, jclass clazz) {
- return base::android::GetApplicationContext();
+ScopedJavaLocalRef<jobject> GetApplicationContext(JNIEnv* env, jclass clazz) {
+ ScopedJavaLocalRef<jobject> r;
+ // Must use Reset to force creation of a new local ref, instead of trying to
+ // adopt the global-ref'ed jobject as a local ref as the constructor would.
+ r.Reset(env, base::android::GetApplicationContext());
+ return r;
}
bool RegisterX509Util(JNIEnv* env) {
« no previous file with comments | « net/android/gurl_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698