diff options
author | husky@chromium.org <husky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-30 17:27:48 +0000 |
---|---|---|
committer | husky@chromium.org <husky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-30 17:27:48 +0000 |
commit | dbedbda7fae6b278aebd8a94110fc19ee76c8c37 (patch) | |
tree | 039c0749110ffde39d7770ed9b97a4f476c1eeac /base/android/jni_generator/SampleForTests.java | |
parent | 854e131abba37f4c5350888942c577614424f524 (diff) | |
download | chromium_src-dbedbda7fae6b278aebd8a94110fc19ee76c8c37.zip chromium_src-dbedbda7fae6b278aebd8a94110fc19ee76c8c37.tar.gz chromium_src-dbedbda7fae6b278aebd8a94110fc19ee76c8c37.tar.bz2 |
Ignore block comments in JNI generator.
The JNI generator was being confused by the word 'native' appearing
in a block comment in ChromeBrowserProvider.java. This patch ensures
that all comments are stripped out correctly.
BUG=138941
TEST=jni_generator_tests.py
Review URL: https://chromiumcodereview.appspot.com/10830035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/android/jni_generator/SampleForTests.java')
-rw-r--r-- | base/android/jni_generator/SampleForTests.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/base/android/jni_generator/SampleForTests.java b/base/android/jni_generator/SampleForTests.java index 3d354cb..6f8b1ca 100644 --- a/base/android/jni_generator/SampleForTests.java +++ b/base/android/jni_generator/SampleForTests.java @@ -78,6 +78,19 @@ class SampleForTests { @CalledByNativeUnchecked void methodThatThrowsException() throws Exception {} + // The generator is not confused by inline comments: + // @CalledByNative void thisShouldNotAppearInTheOutput(); + // @CalledByNativeUnchecked public static void neitherShouldThis(int foo); + + /** + * The generator is not confused by block comments: + * @CalledByNative void thisShouldNotAppearInTheOutputEither(); + * @CalledByNativeUnchecked public static void andDefinitelyNotThis(int foo); + */ + + // String constants that look like comments don't confuse the generator: + private String arrgh = "*/*"; + //------------------------------------------------------------------------------------------------ // Java fields which are accessed from C++ code only must be annotated with @AccessedByNative to // prevent them being eliminated when unreferenced code is stripped. |