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

Unified Diff: base/android/jni_generator/testInnerClassNatives.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/testInnerClassNatives.golden
diff --git a/base/android/jni_generator/testInnerClassNatives.golden b/base/android/jni_generator/testInnerClassNatives.golden
index 68ed9430e52acdba631d959abad0e2f3137f0083..1abf3c7a36f5d68053107965c2f77d0453dd3e01 100644
--- a/base/android/jni_generator/testInnerClassNatives.golden
+++ b/base/android/jni_generator/testInnerClassNatives.golden
@@ -53,6 +53,12 @@ static const JNINativeMethod kMethodsMyInnerClass[] = {
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 kMethodsMyInnerClassSize = arraysize(kMethodsMyInnerClass);

Powered by Google App Engine
This is Rietveld 408576698