Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
Jim Chen 011890c91d Bug 1200343 - Add JNI wrapper for object arrays; r=snorp
This patch adds a specialization for jni::Ref<jni::ObjectArray>, which
includes members for getting the length of the array and accessing
array elements.
2015-09-28 12:07:09 -04:00
Wes Kocher e143a6410c Backed out 4 changesets (bug 1200343) for android talos failures
Backed out changeset 67dc42cbf02b (bug 1200343)
Backed out changeset b077acafcebb (bug 1200343)
Backed out changeset e115ca114601 (bug 1200343)
Backed out changeset 905e1fb54fd4 (bug 1200343)
2015-09-25 13:21:58 -07:00
Jim Chen 3460f51c9f Bug 1200343 - Add JNI wrapper for object arrays; r=snorp
This patch adds a specialization for jni::Ref<jni::ObjectArray>, which
includes members for getting the length of the array and accessing
array elements.
2015-09-25 15:03:34 -04:00
Jim Chen 4403af4250 Bug 1192043 - Add more JNIEnv support and null-check refs in JNI ref classs; r=snorp
Add more constructors in LocalRef and GlobalRef to accommodate use cases
where a JNIEnv is already available for performance reasons. Also add
more null-checks when creating references for performance reasons.
2015-08-25 14:52:16 -04:00
Nathan Froyd a64d0e54a5 Bug 1194806 - part 1 - consistently declare mozilla::jni::detail::TypeAdaptor as a struct; r=jchen
clang doesn't like it when we declare things as a struct in one place
and a class in another.  This change makes all the current usages
consistent and clang happy.
2015-08-14 21:59:27 -04:00
Jim Chen d1f529698f Bug 1192077 - Convert AndroidBridge JNIEnv calls; r=esawin 2015-08-13 00:53:39 -04:00
Jim Chen d836e4a08d Bug 1186467 - Add some JNI utilities for convenience; r=snorp
This patch adds:
* Conversion operator from String::Param to String::LocalRef.
* More overloads of the jni::ThrowException function.
* name members to built-in types like jni::Object, jni::String, etc.
  This allows using jni::Accessors::EnsureClassRef on built-in types
  to get built-in class refs (e.g. jclass for java/lang/String).
* Ability to implicitly convert LocalRef<Cls> to LocalRef<Object>
* Fixes for bugs in LocalRef/GlobalRef where new refs are not created.
* Fixes for inaccurate uses of mozilla::Forward in favor of mozilla::Move
2015-08-04 17:47:28 -04:00
Jim Chen 2003ec14dd Bug 1186530 - Fix compile error when using native methods with ref parameters; r=snorp
We use Ref::From() inside TypeAdapter<Ref>::ToNative to convert a raw JNI
ref argument to a Ref argument for the C++ function. However, that
generates a compile error, unless we make TypeAdapter<Ref> a friend of
Ref, because we intentionally made Ref's copy constructor private and
returning from TypeAdapter<Ref>::ToNative requires the copy constructor.
2015-07-29 15:11:15 -04:00
Jim Chen 788c0ad4c8 Bug 1178850 - Add supporting classes for native JNI calls; r=snorp 2015-07-10 23:41:36 -04:00
Jim Chen 42c05f4a28 Bug 1178850 - Make mozilla::jni::Param more intuitive to use; r=snorp 2015-07-10 23:41:35 -04:00
Wes Kocher 027fd9354a 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 096176c3f0 Bug 1178850 - Add supporting classes for native JNI calls; r=snorp 2015-07-10 16:52:52 -04:00
Jim Chen 92f97132f9 Bug 1178850 - Make mozilla::jni::Param more intuitive to use; r=snorp 2015-07-10 16:52:51 -04:00
Jim Chen 52b4f608fa Bug 1116868 - Add templated JNI classes; r=snorp 2015-01-09 19:33:57 -05:00