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

Unified Diff: base/android/jni_generator/testNatives.golden

Issue 2501193003: Selectively perform JNI registration in render processes on Android. (Closed)
Patch Set: Conditionally register JNI based on process type. Created 4 years 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: base/android/jni_generator/testNatives.golden
diff --git a/base/android/jni_generator/testNatives.golden b/base/android/jni_generator/testNatives.golden
index 2399cd7e60ed29a66d9ab358df00b87584b7a062..876c8e41cd34d0d34ba2cc1496958d904128c8eb 100644
--- a/base/android/jni_generator/testNatives.golden
+++ b/base/android/jni_generator/testNatives.golden
@@ -322,6 +322,12 @@ static const JNINativeMethod kMethodsTestJni[] = {
static bool RegisterNativesImpl(JNIEnv* env) {
if (base::android::IsManualJniRegistrationDisabled()) return true;
+ base::android::LibraryProcessType proc_type =
+ base::android::GetLibraryProcessType(env);
+ if (proc_type != base::android::PROCESS_BROWSER &&
+ proc_type != base::android::PROCESS_UNINITIALIZED) {
+ return true;
+ }
const int kMethodsTestJniSize = arraysize(kMethodsTestJni);

Powered by Google App Engine
This is Rietveld 408576698