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

Unified Diff: android_webview/lib/main/webview_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: 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..28158d2607133defa3a54e1bde8a3a1c04416550 100644
--- a/android_webview/lib/main/webview_entry_point.cc
+++ b/android_webview/lib/main/webview_entry_point.cc
@@ -9,11 +9,9 @@
// 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(),
+ false);
base::android::SetNativeInitializationHook(&android_webview::OnJNIOnLoadInit);
return JNI_VERSION_1_4;
}
« no previous file with comments | « no previous file | base/android/java/src/org/chromium/base/CpuFeatures.java » ('j') | base/android/jni_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698