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

Unified Diff: net/test/android/net_test_entry_point.cc

Issue 2620303004: Remove JNI onload callback vector construction in favour of direct calls. (Closed)
Patch Set: rebase compile errors Created 3 years, 10 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 | « mojo/android/javatests/init_library.cc ('k') | net/test/android/net_test_jni_onload.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/android/net_test_entry_point.cc
diff --git a/net/test/android/net_test_entry_point.cc b/net/test/android/net_test_entry_point.cc
index c7a2dde0545fc40cc8a2aa6d082d43052d4baf90..fa324cbcdd67b62476cb9cc758f0d5300dc251fb 100644
--- a/net/test/android/net_test_entry_point.cc
+++ b/net/test/android/net_test_entry_point.cc
@@ -7,7 +7,10 @@
// This is called by the VM when the shared library is first loaded.
JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
- if (!net::test::OnJNIOnLoadRegisterJNI(vm) || !net::test::OnJNIOnLoadInit()) {
+ base::android::InitVM(vm);
+ JNIEnv* env = base::android::AttachCurrentThread();
+ if (!net::test::OnJNIOnLoadRegisterJNI(env) ||
+ !net::test::OnJNIOnLoadInit()) {
return -1;
}
return JNI_VERSION_1_4;
« no previous file with comments | « mojo/android/javatests/init_library.cc ('k') | net/test/android/net_test_jni_onload.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698