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

Unified Diff: base/android/jni_generator/testNativesLong.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/testNativesLong.golden
diff --git a/base/android/jni_generator/testNativesLong.golden b/base/android/jni_generator/testNativesLong.golden
index 12a153e56fecd77f532cc5fcce04051b2273068c..30f84fbd53c9bd2eee9508e5c5f9d48f55f5e117 100644
--- a/base/android/jni_generator/testNativesLong.golden
+++ b/base/android/jni_generator/testNativesLong.golden
@@ -48,6 +48,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