summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2017-09-28 18:16:50 -0700
committerHans Boehm <hboehm@google.com>2017-10-25 17:17:24 -0700
commit5e5b13f27ea09e1cde586df01b3ef97e03cf5b2a (patch)
tree9d168c8d750ac1a8f8bbf5f7af811b0348b9a442 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentceb336fc8a416c7916b53eab6a6eadd3ebca86a9 (diff)
Convert Binder & BinderProxy to NativeAllocationRegistry
Change the Java BinderProxy to only contain a single native pointer, so that we can get by with a single NativeAllocationRegistry registration. This adds some indirections and a new allocation. But it marginally reduces the number of (expensive) JNI field lookups from native code, and the extra allocation involves significantly less overhead than registering each object twice. This also cleans up the code a little by avoiding some explicit reference count adjustments. Change BinderProxy Binder to use NativeAllocationRegistry instead of finalize(). Change the mObject field in Binder to hold a non-reference-counted but owning pointer to JavaBBinderHolder. Have JavaBBinderHolder no longer inherit from RefBase. Make it clear that neither Binder.mObject, not BinderProxy.mNativeData can be null. Remove null checks. Avoid checking for null returns from C++ new. It would throw anyway, which would cause the process to abort. Test: Booted master. Bug: 65760710 Change-Id: I323d4bdc7e25f8c27b847b6fe2c073eac3f2efe5
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions