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

Unified Diff: android_webview/lib/main/webview_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: android_webview/lib/main/webview_entry_point.cc
diff --git a/android_webview/lib/main/webview_entry_point.cc b/android_webview/lib/main/webview_entry_point.cc
index dfda80186b27ebc244ccb42c41d06b8c93031d95..500dc82a0b20cb8b8a6662ea9a29ffcd5711098f 100644
--- a/android_webview/lib/main/webview_entry_point.cc
+++ b/android_webview/lib/main/webview_entry_point.cc
@@ -9,11 +9,8 @@
// This is called by the VM when the shared library is first loaded.
// Most of the initialization is done in LibraryLoadedOnMainThread(), not here.
JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
- // WebView uses native JNI exports; disable manual JNI registration because
- // we don't have a good way to detect the JNI registrations which is called,
- // outside of OnJNIOnLoadRegisterJNI code path.
- base::android::DisableManualJniRegistration();
base::android::InitVM(vm);
+ base::android::InitJniRegistrationType(base::android::AttachCurrentThread());
base::android::SetNativeInitializationHook(&android_webview::OnJNIOnLoadInit);
return JNI_VERSION_1_4;
}

Powered by Google App Engine
This is Rietveld 408576698