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

Side by Side Diff: base/android/jni_generator/testMultipleJNIAdditionalImport.golden

Issue 2361353002: Link stack frames of JNI stubs to JNI callbacks. (Closed)
Patch Set: git cl format Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is autogenerated by 5 // This file is autogenerated by
6 // base/android/jni_generator/jni_generator.py 6 // base/android/jni_generator/jni_generator.py
7 // For 7 // For
8 // org/chromium/foo/Foo 8 // org/chromium/foo/Foo
9 9
10 #ifndef org_chromium_foo_Foo_JNI 10 #ifndef org_chromium_foo_Foo_JNI
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 static void Java_Foo_calledByNative(JNIEnv* env, const 45 static void Java_Foo_calledByNative(JNIEnv* env, const
46 base::android::JavaRefOrBare<jobject>& callback1, 46 base::android::JavaRefOrBare<jobject>& callback1,
47 const base::android::JavaRefOrBare<jobject>& callback2) { 47 const base::android::JavaRefOrBare<jobject>& callback2) {
48 CHECK_CLAZZ(env, Foo_clazz(env), 48 CHECK_CLAZZ(env, Foo_clazz(env),
49 Foo_clazz(env)); 49 Foo_clazz(env));
50 jmethodID method_id = 50 jmethodID method_id =
51 base::android::MethodID::LazyGet< 51 base::android::MethodID::LazyGet<
52 base::android::MethodID::TYPE_STATIC>( 52 base::android::MethodID::TYPE_STATIC>(
53 env, Foo_clazz(env), 53 env, Foo_clazz(env),
54 "calledByNative", 54 "calledByNative",
55
56 "(" 55 "("
57 "Lorg/chromium/foo/Bar1$Callback;" 56 "Lorg/chromium/foo/Bar1$Callback;"
58 "Lorg/chromium/foo/Bar2$Callback;" 57 "Lorg/chromium/foo/Bar2$Callback;"
59 ")" 58 ")"
60 "V", 59 "V",
61 &g_Foo_calledByNative); 60 &g_Foo_calledByNative);
62 61
63 env->CallStaticVoidMethod(Foo_clazz(env), 62 env->CallStaticVoidMethod(Foo_clazz(env),
64 method_id, callback1.obj(), callback2.obj()); 63 method_id, callback1.obj(), callback2.obj());
65 jni_generator::CheckException(env); 64 jni_generator::CheckException(env);
66
67 } 65 }
68 66
69 // Step 3: RegisterNatives. 67 // Step 3: RegisterNatives.
70 68
71 static const JNINativeMethod kMethodsFoo[] = { 69 static const JNINativeMethod kMethodsFoo[] = {
72 { "nativeDoSomething", 70 { "nativeDoSomething",
73 "(" 71 "("
74 "Lorg/chromium/foo/Bar1$Callback;" 72 "Lorg/chromium/foo/Bar1$Callback;"
75 "Lorg/chromium/foo/Bar2$Callback;" 73 "Lorg/chromium/foo/Bar2$Callback;"
76 ")" 74 ")"
(...skipping 10 matching lines...) Expand all
87 kMethodsFooSize) < 0) { 85 kMethodsFooSize) < 0) {
88 jni_generator::HandleRegistrationError( 86 jni_generator::HandleRegistrationError(
89 env, Foo_clazz(env), __FILE__); 87 env, Foo_clazz(env), __FILE__);
90 return false; 88 return false;
91 } 89 }
92 90
93 return true; 91 return true;
94 } 92 }
95 93
96 #endif // org_chromium_foo_Foo_JNI 94 #endif // org_chromium_foo_Foo_JNI
OLDNEW
« no previous file with comments | « base/android/jni_generator/testFromJavaPGenerics.golden ('k') | base/android/jni_generator/testNativeExportsOnlyOption.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698