History log of /libnativehelper/JNIHelp.cpp
Revision Date Author Comments
1ed11b4a0c2ee968df0625afbd813e16b6604649 12-Jun-2016 Elliott Hughes <enh@google.com> libnativehelper needs _BSD_SOURCE.

Change-Id: I7fdde4fab7c8ea95fbc7b9674f84989603069cce
13803f68746a42577befe9ec6e2b26ee9ffd5dd9 21-Mar-2016 Dimitry Ivanov <dimitry@google.com> Workaround for apps using a copy of libnativehelper

When this library is loaded by app via greylist
it ends up having its own copy of the library which does
not have JNI constants properly initialized.

This workaround checks the initialization status and
initializes them lazily in this case.

Bug: http://b/27724707
Change-Id: I4d12913c86a7e8e86c910c90316fc0b94190ac94
(cherry picked from commit 3c9164503aed5e8837480267d77917c3f33cbb9f)
01332142075c24582afce0273e96f083e84fbd68 02-May-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings.

Bug: 28341362
Change-Id: Ief7bba536cca6773b1462b5273a330fa8da2bc51
3c9164503aed5e8837480267d77917c3f33cbb9f 21-Mar-2016 Dimitry Ivanov <dimitry@google.com> Workaround for apps using a copy of libnativehelper

When this library is loaded by app via greylist
it ends up having its own copy of the library which does
not have JNI constants properly initialized.

This workaround checks the initialization status and
initializes them lazily in this case.

Bug: http://b/27724707
Change-Id: I4d12913c86a7e8e86c910c90316fc0b94190ac94
78d4c5476e399532f13fbfbe6225c37314628541 09-Nov-2015 Narayan Kamath <narayan@google.com> Track renaming of FileDescriptor field.

|fd| -> |descriptor|.

(cherry picked from commit db32ccab3a3dc16f259eb8f707fee6bbf6a8a4c8)

Change-Id: I817f1c70a008466b148e3c6fe80872d394806b71
33a865658db2da5844cbb5a59b8395a18980c672 05-May-2015 Piotr Jastrzebski <haaawk@google.com> Track usage of OpenJdk's FileDescriptor class.

Fix jniGetFdFromFileDescriptor and jniSetFileDescriptorOfFd.

(cherry picked from commit 1b23abdcbdcd44ba72cea21cb145fad9c43755e3)

Change-Id: If25f31f8742fae19083ba53a5b990ba5b2dc86cc
db32ccab3a3dc16f259eb8f707fee6bbf6a8a4c8 09-Nov-2015 Narayan Kamath <narayan@google.com> Track renaming of FileDescriptor field.

|fd| -> |descriptor|.

Change-Id: I4fce1fe3a5df1b27a7cd547484a6dcea9565e0d8
1b23abdcbdcd44ba72cea21cb145fad9c43755e3 05-May-2015 Piotr Jastrzebski <haaawk@google.com> Track usage of OpenJdk's FileDescriptor class.

Fix jniGetFdFromFileDescriptor and jniSetFileDescriptorOfFd.

Change-Id: I9c239f0ba461d1b5bd4c9ef4896910190690fcd3
6c5be19e383c1e9c5956ec00560f09286ee205b6 03-Aug-2015 Andreas Gampe <agampe@google.com> Libnativehelper: Fix unused result warning

For build-system CFLAGS clean-up.

Bug: 18632512
Change-Id: I07741c7fce11fb072640f49bab6a787fd7dfd8e7
8288ddeb1bed3dca35c7e182f769c62e1f2a18fd 04-Nov-2014 Ian Rogers <irogers@google.com> Add DISALLOW_COPY_AND_ASSIGN macro.

Make the DISALLOW_COPY_AND_ASSIGN macro delete the member functions rather
than just not defining them to improve analysis of the Scoped.. classes.
Add a few missing const qualifiers.

Change-Id: I48eee0c22908d45a05df6979aa61442d2eedcf36
2fc9d0aeb7e3a8aa097a791b77d32114015fffb8 19-Aug-2014 Elliott Hughes <enh@google.com> Fix libnativehelper strerror_r build break.

We can remove this when there's a newer NDK to build with.

Change-Id: I2b4dccd720954f40abc3753028187e413fc0b3c8
d47c325e1d9090bb0407f8e4b60910bbb74a0ae1 24-Jun-2014 Huanqi Chen <huanqi.chen@sonymobile.com> Fixing PrintWriter not being disposed

When there is an exception being thrown, the getStackTrace method of
JNIHelp will initialize a PrintWriter to print the exception message.
But the instance of the PrintWriter will not be disposed, because
PrintWriter will hold the string reference, and finally the local
reference table of VM will overflow. Then system will crash.

The change disposes the PrintWriter from the local reference table
to prevent the overflow.

Change-Id: Ie8dcb3d941034e6e1f480196373189f2d152cf79
e29dbf50ec0a90b91679d7cecd8e55c54f4f9ad0 31-Oct-2013 Narayan Kamath <narayan@google.com> Add null checking for filedescriptor helpers.

- Check for a null descriptor passed in to
jniGetFdFromFileDescriptor
- Make sure we don't segfault if we can't allocate
a new java object in jniGetFileDescriptorFromFd.

Change-Id: Ic420ce76695f9526833dac98e1813c37c167306d
61b1a8c6de2563a8633e997a8f1f93d758dc7282 18-Oct-2013 Mathieu Chartier <mathieuc@google.com> Remove jniGetNonMovableArrayElements.

No longer needed since we use VMRuntime.newNonMovableArray +
VMRuntime.addressOf which are superior.

Depends on:
https://android-review.googlesource.com/#/c/68284/

Change-Id: Icccfc36fd15b5b8d444abd1607f4eb81ca461fb3
d60512cd12c14fb40f32b1e1e6a5668251466810 08-Oct-2013 Elliott Hughes <enh@google.com> Stop trying to guess whether we're using glibc when we already know.

Necessary to fix the x86_64 build.

Change-Id: Idb7b793ba478feba4389e623529674ce64caecb7
a77f3a243aad5632832fa822e1ac07bb4b5d5668 09-Sep-2013 Ruben Brunk <rubenbrunk@google.com> Add support for ndk libnativehelper build.

Bug: 10680559

Change-Id: I18491baac6acc4486f2e87175c922b40b5c17179
348ff592b57949eb9ba9dedb5813b439fb102d96 10-Sep-2013 Elliott Hughes <enh@google.com> Remove a dead #define from libnativehelper.

Change-Id: I5922d13101efb8d12f2f11c4a88cb7712e55c003
a4e4e74a4cf6671dd942e1da3dcfab29010d9ab4 04-Sep-2013 Elliott Hughes <enh@google.com> Remove dead code: jniGetStackTrace.

Change-Id: I841da6eef183ddf13a9c058c204f4f244a389eb3
deb6d5d52ffc9ae68c082a7ea2c0d78ccfbb135d 10-May-2013 Brian Carlstrom <bdc@google.com> Fix punctuation difference in merge resolution

Change-Id: Ib280a03cfa4ebf83244ac84b500a810d63260408
dc176c52952dbbd4bcf717821e09f1b5446df37e 03-Apr-2013 Jeff Brown <jeffbrown@google.com> Move jniGetReferent to use JniConstants

Change-Id: Ia99480728245c770169d388f63fae6bcde6ba2cc
dd8af232bea88b3f8df6e30e664175c294da5847 14-May-2012 Brian Carlstrom <bdc@google.com> Moving libnativehelper additions from libcore

(cherry picked from commit b66098568f22d672aac3949a39e92d8a474e4b94)

Change-Id: I60381a253af8ee738b1dac8ec124bf13aa7f5f82
a7de6785939e53982e93afacf03647ff1a759b5a 03-Apr-2013 Jeff Brown <jeffbrown@google.com> Add a helper to get the referent of a Reference.

Change-Id: I8ac5a69fab563e220d48c94e254f5ed3055abe5f
a3b5700211a46457c0ada87d85cbae96f5dea5d8 22-Jan-2013 Elliott Hughes <enh@google.com> Call JNIEnv FatalError rather than abort(3).

Change-Id: Ieb9cf7a3dafa88e6fefd5728365aebef85e7e127
73d3c2e3ed100f1d0ccc08a9675844bf8a0848fa 04-May-2012 Elliott Hughes <enh@google.com> Make libnativehelper stand-alone.

Bug: 6369821
Change-Id: I502211bddaf60d6097b81b35f606bbcdd1a3e092
e2b11e7e4077187462324810d2b8a404417ba6a2 11-Apr-2012 Jeff Brown <jeffbrown@google.com> Make sure we rethrow the same exception we started with.

Bug: 6312938
Change-Id: I41d8adf27fd32103c55d9eeafa28a25c37f5029d
79a0d9c410a2060744e044aec2536e29a4f5213c 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Also fix an occurrence of LOGW missed in an earlier change.

Bug: 5449033
Change-Id: I2e3b23839e6dcd09015d6402280e9300c75e3406
7f18b364f0a76f13e741b315be30cb95b9005c6e 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: Ia5d301248024df26c2a29dabdfe738e39ec87c82
292b1c28091b32a418eb44dcdef157a7b808abd4 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I8bd96961e369a08e86ff78b82d90f20f42787eb1
a6f951cbffc9ba9b906b5995958396402d0a32ab 09-Jun-2011 Elliott Hughes <enh@google.com> Tidy up some includes.

Change-Id: I5abd4f8ab06db0c77fa369fcd97d8f1259b343df
87f62a8c3826070d807817238a1ee8afd11ec34c 23-Apr-2011 Elliott Hughes <enh@google.com> Move JNIHelp's implementation to C++.

Ouch.

Change-Id: I81c0457a95549f1bef7cc8d9ab23d6ca4475cdb5