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

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

Issue 536023003: Fix crash in Cronet CreateUrlRequestAdapter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_jni.cc
diff --git a/components/cronet/android/cronet_jni.cc b/components/cronet/android/cronet_jni.cc
index 890649a183a7496a9673f8c2ed3471d4de543d10..2c39e4164513c6434be6e30bafc971b6a63a20d8 100644
--- a/components/cronet/android/cronet_jni.cc
+++ b/components/cronet/android/cronet_jni.cc
@@ -10,6 +10,7 @@
#include "components/cronet/android/chromium_url_request_context.h"
#include "net/android/net_jni_registrar.h"
#include "url/android/url_jni_registrar.h"
+#include "url/url_util.h"
#if !defined(USE_ICU_ALTERNATIVES_ON_ANDROID)
#include "base/i18n/icu_util.h"
@@ -49,6 +50,8 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) {
base::i18n::InitializeICU();
#endif
+ url::Initialize();
+
return JNI_VERSION_1_6;
}
@@ -57,5 +60,6 @@ extern "C" void JNIEXPORT JNICALL JNI_OnUnLoad(JavaVM* jvm, void* reserved) {
delete g_at_exit_manager;
g_at_exit_manager = NULL;
}
+ url::Shutdown();
Charles 2014/09/03 18:28:20 I don't think this actually ever gets called. http
mef 2014/09/03 18:32:38 Yeah, but if it ever does we will do the right thi
mmenke 2014/09/03 18:43:06 Is this the right thing? Can we be guaranteed tha
mef 2014/09/03 18:56:04 Done.
}

Powered by Google App Engine
This is Rietveld 408576698