Index: content/app/android/library_loader_hooks.cc |
diff --git a/content/app/android/library_loader_hooks.cc b/content/app/android/library_loader_hooks.cc |
index 9b441d9fe95f3f9dbfb2a7b5f52db1845b77f2f2..7a99f82e3395e9baf8d9b93f40a9f1baf9021499 100644 |
--- a/content/app/android/library_loader_hooks.cc |
+++ b/content/app/android/library_loader_hooks.cc |
@@ -9,6 +9,7 @@ |
#include "base/android/jni_android.h" |
#include "base/android/jni_registrar.h" |
#include "base/android/jni_string.h" |
+#include "base/android/library_loader/library_loader_hooks.h" |
#include "base/base_switches.h" |
#include "base/command_line.h" |
#include "base/files/file_path.h" |
@@ -67,8 +68,11 @@ bool EnsureJniRegistered(JNIEnv* env) { |
if (!content::android::RegisterCommonJni(env)) |
return false; |
- if (!content::android::RegisterBrowserJni(env)) |
- return false; |
+ if (base::android::GetLibraryProcessType(env) == |
+ base::android::PROCESS_BROWSER) { |
Torne
2016/09/12 13:10:13
There's four values for process type, not just two
michaelbai
2016/09/12 18:54:36
The four process types defined in https://cs.chrom
agrieve
2016/09/12 19:22:22
Is it accurate that JNI registration isn't require
michaelbai
2016/09/12 19:25:27
No, as Chrome.apk and ChromeModern.apk still use c
|
+ if (!content::android::RegisterBrowserJni(env)) |
+ return false; |
+ } |
if (!content::android::RegisterAppJni(env)) |
return false; |