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

Unified Diff: chrome/browser/android/chrome_entry_point.cc

Issue 2501193003: Selectively perform JNI registration in render processes on Android. (Closed)
Patch Set: Update NativeInit 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: chrome/browser/android/chrome_entry_point.cc
diff --git a/chrome/browser/android/chrome_entry_point.cc b/chrome/browser/android/chrome_entry_point.cc
index 5bc9215ded3a07c1f0967cfd1f5461d7ffd50081..c90eefa0d03ac7db241b8d341f9f6d74efd089a8 100644
--- a/chrome/browser/android/chrome_entry_point.cc
+++ b/chrome/browser/android/chrome_entry_point.cc
@@ -25,6 +25,8 @@ bool NativeInit() {
// 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());
if (!android::OnJNIOnLoadRegisterJNI(vm, base::Bind(&RegisterJNI))) {
return -1;
}

Powered by Google App Engine
This is Rietveld 408576698