OSDN Git Service

ART: Fix RegisterNative order
authorAndreas Gampe <agampe@google.com>
Mon, 18 May 2015 22:52:22 +0000 (15:52 -0700)
committerAndreas Gampe <agampe@google.com>
Wed, 20 May 2015 21:04:58 +0000 (14:04 -0700)
commit3f1dc56914177993b1b018bf21ce7d39d7feecda
tree6043e28732d988731bd177e9502bfa05a5f48de6
parentc1c5de731e2a23646e02e91311de29ecdd167dbd
ART: Fix RegisterNative order

First check for both direct and virtual methods in the current class,
then move to the parent.

Optimize registration by checking first whether the current method
under test is native. This slows down registering implementations
in parent classes. Add a CheckJNI warning for this.

Add a run-test to check the behavior. Fix host comparison testing.

Bug: 19569721
Change-Id: I61e77117d96310632aad123d7f1279d0f834dc99
runtime/jni_internal.cc
test/139-register-natives/check [new file with mode: 0755]
test/139-register-natives/expected.txt [new file with mode: 0644]
test/139-register-natives/info.txt [new file with mode: 0644]
test/139-register-natives/regnative.cc [new file with mode: 0644]
test/139-register-natives/src/Main.java [new file with mode: 0644]
test/Android.libarttest.mk
test/Android.run-test.mk
test/etc/run-test-jar
test/run-test