From 85a098af5fc8d2dd0e39d61c9f93fc6257d631c5 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 31 Mar 2016 13:30:53 -0700 Subject: ART: Better support for arraycopy in unstarted runtime Extend the System.arraycopy() cutout in the unstarted runtime to support arrays with differing component types. Add tests. Bug: 27805718 Change-Id: Iaacd95a372e9bfa26e9055a06b0d8f0335b8d6d1 --- runtime/native/java_lang_System.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/native/java_lang_System.cc') diff --git a/runtime/native/java_lang_System.cc b/runtime/native/java_lang_System.cc index d9863c579e..9e2d68d363 100644 --- a/runtime/native/java_lang_System.cc +++ b/runtime/native/java_lang_System.cc @@ -149,7 +149,9 @@ static void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, dstObjArray->AssignableMemcpy(dstPos, srcObjArray, srcPos, count); return; } - dstObjArray->AssignableCheckingMemcpy(dstPos, srcObjArray, srcPos, count, true); + // This code is never run under a transaction. + DCHECK(!Runtime::Current()->IsActiveTransaction()); + dstObjArray->AssignableCheckingMemcpy(dstPos, srcObjArray, srcPos, count, true); } // Template to convert general array to that of its specific primitive type. -- cgit v1.2.3-59-g8ed1b