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

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

Issue 991923002: [cronet] Fix race to call InitApplicationContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove CreateRequestContextAdapter dead param 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 65b00fcf82262a203cf3d78e0785d81607bccb51..65fa39b000a130a6fc04b3b4740b5cd5cf181d6e 100644
--- a/components/cronet/android/cronet_library_loader.cc
+++ b/components/cronet/android/cronet_library_loader.cc
@@ -87,12 +87,16 @@ void CronetOnUnLoad(JavaVM* jvm, void* reserved) {
}
}
-void CronetInitOnMainThread(JNIEnv* env, jclass jcaller, jobject japp_context) {
+void CronetInitApplicationContext(JNIEnv* env,
+ jclass jcaller,
+ jobject japp_context) {
// Set application context.
base::android::ScopedJavaLocalRef<jobject> scoped_app_context(env,
japp_context);
base::android::InitApplicationContext(env, scoped_app_context);
+}
+void CronetInitOnMainThread(JNIEnv* env, jclass jcaller) {
#if !defined(USE_ICU_ALTERNATIVES_ON_ANDROID)
base::i18n::InitializeICU();
#endif

Powered by Google App Engine
This is Rietveld 408576698