Preserve JNI bindings across structural redefinition
We were incorrectly clearing the JNI bindings of native methods on
classes which are structurally redefined. This can cause major issues
with code which uses JNIEnv::RegisterNatives to setup native methods.
This change copies the required information from the old to the new
method. Since the RegisterNatives method can be run asynchronously we
need to wait until we gain the final SuspendAll to actually read and
copy the registration.
Test: ./test.py --host
Bug: 158476592
Change-Id: Ie8a33234bb852a46e5275502c842553637c8a2c6
diff --git a/test/knownfailures.json b/test/knownfailures.json
index 10c05f9..aaa3f3f 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -1199,7 +1199,8 @@
"2009-structural-local-ref",
"2011-stack-walk-concurrent-instrument",
"2012-structural-redefinition-failures-jni-id",
- "2033-shutdown-mechanics"],
+ "2033-shutdown-mechanics",
+ "2035-structural-native-method"],
"variant": "jvm",
"description": ["Doesn't run on RI."]
},