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

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

Issue 2501193003: Selectively perform JNI registration in render processes on Android. (Closed)
Patch Set: Conditionally register JNI based on process type. Created 3 years, 11 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: 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..405dd9681c2d36ff7bf38705a459176c01093a4f 100644
--- a/net/test/android/net_test_entry_point.cc
+++ b/net/test/android/net_test_entry_point.cc
@@ -7,6 +7,9 @@
// This is called by the VM when the shared library is first loaded.
JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
+ base::android::InitVM(vm);
+ base::android::InitJniRegistrationType(base::android::AttachCurrentThread(),
+ true);
if (!net::test::OnJNIOnLoadRegisterJNI(vm) || !net::test::OnJNIOnLoadInit()) {
return -1;
}

Powered by Google App Engine
This is Rietveld 408576698