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

Unified Diff: base/android/jni_generator/jni_generator.py

Issue 872843004: Update JNI generator for javap version 1.8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shorten line in test case Created 5 years, 10 months 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
« no previous file with comments | « no previous file | base/android/jni_generator/jni_generator_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_generator/jni_generator.py
diff --git a/base/android/jni_generator/jni_generator.py b/base/android/jni_generator/jni_generator.py
index 53de36569b8b4c25a6a6935f81b3426f68a7a762..6e39c13d4b0631b90cc300fa26f8a324d8085283 100755
--- a/base/android/jni_generator/jni_generator.py
+++ b/base/android/jni_generator/jni_generator.py
@@ -209,7 +209,11 @@ class JniParams(object):
@staticmethod
def ParseJavaPSignature(signature_line):
prefix = 'Signature: '
- return '"%s"' % signature_line[signature_line.index(prefix) + len(prefix):]
+ index = signature_line.find(prefix)
+ if index == -1:
+ prefix = 'descriptor: '
+ index = signature_line.index(prefix)
+ return '"%s"' % signature_line[index + len(prefix):]
@staticmethod
def JavaToJni(param):
« no previous file with comments | « no previous file | base/android/jni_generator/jni_generator_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698