Commit Graph

26 Commits

Author SHA1 Message Date
Jim Chen
4161106c9b Bug 1194360 - Remove use of inherited constructors; r=snorp
GeneratedJNIWrappers.h was updated in bug 1192079 to use inherited
constructors, which is a gcc 4.8 feature. Many people are still using an
older version of NDK which only comes with gcc 4.7.
2015-08-13 16:57:34 -04:00
Jim Chen
fdd65cec9b Bug 1192079 - Use unqualified names when possible; r=snorp
To reduce verbosity of the generated code, this patch makes the code
generator use unqualified names when possible, e.g. use State::Ref
instead of GeckoThread::State::Ref. To accomplish that, function
prototypes now use the C++11 -> syntax for return types.
2015-08-13 00:53:39 -04:00
Jim Chen
28393ad93c Bug 1192079 - Support inner classes in generated JNI wrapper; r=snorp
Currently, when we generate JNI wrapper for an inner class, the
resulting C++ class will not actually be a nested class of the enclosing
class. As a result, the class can be confusing to use. For example,
wrapping Java class GeckoThread.State results in two unrelated C++
classes, GeckoThread and State, and it'd be confusing to use State by
itself.

This patch adds support for inner classes. We start by scanning only for
top-level classes, and when processing each top-level class, we
recursively scan for inner classes through
JarClassIterator.getInnerClasses() and CodeGenerator.generateClasses().
For each Java inner classes, the resulting C++ class will be a nested
class. For example, wrapping GeckoThread.State will produce
widget::GeckoThread and widget::GeckoThread::State.
2015-08-13 00:53:39 -04:00
Jim Chen
3fa6728766 Bug 1186517 - Adjust white spacing in generated files; r=me 2015-07-29 15:11:15 -04:00
Jim Chen
be3b8007d4 Bug 1178850 - Generate naive method bindings in annotation processor; r=snorp 2015-07-10 23:41:35 -04:00
Jim Chen
2ce6171c93 Bug 1178850 - Make mozilla::jni::Param more intuitive to use; r=snorp 2015-07-10 23:41:35 -04:00
Wes Kocher
0f9c730ffe Backed out 5 changesets (bug 1178850) for android build bustage CLOSED TREE
Backed out changeset 79085d3894e8 (bug 1178850)
Backed out changeset c02b603104ea (bug 1178850)
Backed out changeset d6dab7810669 (bug 1178850)
Backed out changeset 8ee5809f349b (bug 1178850)
Backed out changeset 821b22ce79e1 (bug 1178850)
2015-07-10 14:17:53 -07:00
Jim Chen
338b0bbf6f Bug 1178850 - Generate naive method bindings in annotation processor; r=snorp 2015-07-10 16:52:52 -04:00
Jim Chen
411cca6799 Bug 1178850 - Make mozilla::jni::Param more intuitive to use; r=snorp 2015-07-10 16:52:51 -04:00
Jim Chen
60b2a7d4b1 Bug 1116589 - Use templated JNI classes in generated bindings; r=snorp 2015-01-09 19:33:57 -05:00
James Willcox
03b0742d34 Bug 1086693 - Part 5: Add a 'catchException' mode to JNI generator r=ckitching 2014-11-13 12:47:24 -06:00
James Willcox
26752de067 Bug 1086693 - Part 4: Add a lazy initialization mode to CodeGenerator, and use it for SDK bindings r=ckitching 2014-11-13 12:47:24 -06:00
James Willcox
66ed6b797b Bug 1086693 - Part 3: Don't generate members that are above a given API version r=ckitching 2014-11-13 12:47:23 -06:00
James Willcox
5dfe4c46f1 Bug 1086693 - Part 1: Add SDKProcessor r=ckitching 2014-11-13 12:47:22 -06:00
Chris Kitching
fb0545ad89 Bug 1049105: Make annotation processor compile with Xlint:all r=kats 2014-08-05 21:13:49 -07:00
Chris Kitching
d98df09b73 Bug 1049105: Remove generateStatic option from JNI wrapper generator r=kats 2014-08-05 15:04:38 -07:00
Kartikaya Gupta
dc9c3b5284 Follow-up to bug 1019836 to replace tabs with spaces. r=me and DONTBUILD because whitespace changes only. 2014-08-05 15:52:43 -04:00
Brad Lassey
3d7bc1f8f1 bug 1019836 - Support narrow char strings in android bridge r=snorp 2014-06-04 15:04:12 -04:00
Chris Peterson
62602f7c8a Bug 990764 - Replace MOZ_ASSUME_UNREACHABLE with MOZ_CRASH in widget/android. r=blassey 2014-04-27 18:56:46 -07:00
Jim Chen
5e7c1ef7b1 Bug 958706 - Make generated JNI wrappers handle uncaught exceptions; r=blassey
This patch adds AndroidBridge::HandleUncaughtException calls to generated JNI wrappers. Also, the JNI annotation now accepts the noThrow flag to indicate that the JNI caller wishes to handle Exceptions manually.
2014-01-17 23:32:25 -06:00
Ehsan Akhgari
dcde29f668 Bug 956783 - Stop using NULL in Fennec's JNI code; r=jchen 2014-01-06 15:21:27 -05:00
Chris Kitching
49451c6bd9 Bug 913985: Part 3 - Update the annotation processor to generate wrapper classes. r=kats 2013-11-21 20:41:28 +00:00
Ryan VanderMeulen
4501219603 Backed out 7 changesets (bug 913985) for intermittent Android crashes.
Backed out changeset 53513a959cf0 (bug 913985)
Backed out changeset d23d1e678417 (bug 913985)
Backed out changeset a9c9187b4f4a (bug 913985)
Backed out changeset c6b02e4a3e35 (bug 913985)
Backed out changeset 895dae322e3c (bug 913985)
Backed out changeset 3d97e6a53313 (bug 913985)
Backed out changeset 892bb017f8ba (bug 913985)
2013-11-19 10:56:09 -05:00
Chris Kitching
65fcb03a86 Bug 913985 - Part 3: update the annotation processor to generate wrapper classes. r=kats 2013-11-18 20:31:35 -08:00
Chris Kitching
c171ef67b7 Bug 914760 - Generate less debugging code. r=rnewman 2013-09-10 21:10:47 -04:00
Chris Kitching
9cde6fa799 Bug 794981 - Part 8: Add an annotation processor to the build process to generate the contents of part 5. r=kats, r=glandium 2013-09-09 08:57:37 -04:00