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

Unified Diff: components/cronet/android/cronet_library_loader.cc

Issue 981013002: [Cronet] Make sure to only pass the application Context to InitApplicationContext to avoid DCHECK fa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add ChromiumUrlRequestContext test too Created 5 years, 9 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
Index: components/cronet/android/cronet_library_loader.cc
diff --git a/components/cronet/android/cronet_library_loader.cc b/components/cronet/android/cronet_library_loader.cc
index 5286f9bca9b0fced274eea5d39325800a43e1bb3..65b00fcf82262a203cf3d78e0785d81607bccb51 100644
--- a/components/cronet/android/cronet_library_loader.cc
+++ b/components/cronet/android/cronet_library_loader.cc
@@ -87,10 +87,11 @@ void CronetOnUnLoad(JavaVM* jvm, void* reserved) {
}
}
-void CronetInitOnMainThread(JNIEnv* env, jclass jcaller, jobject jcontext) {
+void CronetInitOnMainThread(JNIEnv* env, jclass jcaller, jobject japp_context) {
// Set application context.
- base::android::ScopedJavaLocalRef<jobject> scoped_context(env, jcontext);
- base::android::InitApplicationContext(env, scoped_context);
+ base::android::ScopedJavaLocalRef<jobject> scoped_app_context(env,
+ japp_context);
+ base::android::InitApplicationContext(env, scoped_app_context);
#if !defined(USE_ICU_ALTERNATIVES_ON_ANDROID)
base::i18n::InitializeICU();

Powered by Google App Engine
This is Rietveld 408576698