Remove kNoCopyMagic.
Was needed by jniGetNonMovableArrayElements which is now removed.
Change-Id: Ie71eda5c5c3643c12db07d249597dbb2df41e88e
diff --git a/runtime/check_jni.cc b/runtime/check_jni.cc
index 3b1bda4..54cbfe6 100644
--- a/runtime/check_jni.cc
+++ b/runtime/check_jni.cc
@@ -90,12 +90,6 @@
reinterpret_cast<JNIEnvExt*>(env)->self->SirtContains(localRef);
}
-// Hack to allow forcecopy to work with jniGetNonMovableArrayElements.
-// The code deliberately uses an invalid sequence of operations, so we
-// need to pass it through unmodified. Review that code before making
-// any changes here.
-#define kNoCopyMagic 0xd5aab57f
-
// Flags passed into ScopedCheck.
#define kFlag_Default 0x0000
@@ -1098,10 +1092,6 @@
* back into the managed heap, and may or may not release the underlying storage.
*/
static void ReleaseGuardedPACopy(JNIEnv* env, jarray java_array, void* dataBuf, int mode) {
- if (reinterpret_cast<uintptr_t>(dataBuf) == kNoCopyMagic) {
- return;
- }
-
ScopedObjectAccess soa(env);
mirror::Array* a = soa.Decode<mirror::Array*>(java_array);
@@ -1596,9 +1586,7 @@
template<typename ResultT>
ResultT Check(JNIEnv* env, jarray array, jboolean* isCopy, ResultT result) {
if (force_copy && result != NULL) {
- if (no_copy != kNoCopyMagic) {
- result = reinterpret_cast<ResultT>(CreateGuardedPACopy(env, array, isCopy));
- }
+ result = reinterpret_cast<ResultT>(CreateGuardedPACopy(env, array, isCopy));
}
return result;
}