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

Unified Diff: android_webview/lib/main/webview_entry_point.cc

Issue 50493015: Allow JNI registration to be performed eagerly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simpler approach Created 7 years, 1 month 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 | « no previous file | content/app/android/library_loader_hooks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e7ea8af938d7c8a5faaad2c1c837f6c7f5a3e9e6..858601f3ba0335fe7f32870ddb5df7b947a6b63a 100644
--- a/android_webview/lib/main/webview_entry_point.cc
+++ b/android_webview/lib/main/webview_entry_point.cc
@@ -27,6 +27,11 @@ JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
if (!content::RegisterLibraryLoaderEntryHook(env))
return -1;
+ // Register content JNI functions now, rather than waiting until
+ // LibraryLoadedOnMainThread, so that we can call into native code early.
+ if (!content::EnsureJniRegistered(env))
+ return -1;
+
// Register JNI for components we depend on.
if (!RegisterNativeMethods(
env,
« no previous file with comments | « no previous file | content/app/android/library_loader_hooks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698