diff options
author | Carl Shapiro <cshapiro@google.com> | 2011-04-19 18:20:31 -0700 |
---|---|---|
committer | Carl Shapiro <cshapiro@google.com> | 2011-04-19 18:20:31 -0700 |
commit | c233f165a425ce44c7e5e75b14bc4fc018288345 (patch) | |
tree | 01ec38d17edf183b483a24ab31850d8cef038807 | |
parent | 38fd4b5dbeda0ff34de2dd18d81cb2faf2c06522 (diff) | |
download | android_dalvik-c233f165a425ce44c7e5e75b14bc4fc018288345.tar.gz android_dalvik-c233f165a425ce44c7e5e75b14bc4fc018288345.tar.bz2 android_dalvik-c233f165a425ce44c7e5e75b14bc4fc018288345.zip |
Revert "am 024b7b9d: am a0739ea3: am af242824: Revert "Fix a type error in the allocation of non-moving arrays." per Ryan\'s request"
This reverts commit d336a946ee81fd26cffcca63bccc18a4a7536303, reversing
changes made to f4b9e2752312c0c513f6ec416e900e5392e9a96c.
Change-Id: I72a877f57b64618345bebfbe22e57bbe334c7726
-rw-r--r-- | vm/native/dalvik_system_VMRuntime.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vm/native/dalvik_system_VMRuntime.cpp b/vm/native/dalvik_system_VMRuntime.cpp index 8d849915e..b704e3e36 100644 --- a/vm/native/dalvik_system_VMRuntime.cpp +++ b/vm/native/dalvik_system_VMRuntime.cpp @@ -97,7 +97,6 @@ static void Dalvik_dalvik_system_VMRuntime_newNonMovableArray(const u4* args, { ClassObject* elementClass = (ClassObject*) args[1]; int length = args[2]; - ArrayObject* newArray; if (elementClass == NULL) { dvmThrowNullPointerException(NULL); @@ -111,7 +110,10 @@ static void Dalvik_dalvik_system_VMRuntime_newNonMovableArray(const u4* args, // TODO: right now, we don't have a copying collector, so there's no need // to do anything special here, but we ought to pass the non-movability // through to the allocator. - newArray = dvmAllocObjectArray(elementClass, length, ALLOC_DEFAULT); + ClassObject* arrayClass = dvmFindArrayClassForElement(elementClass); + ArrayObject* newArray = dvmAllocArrayByClass(arrayClass, + length, + ALLOC_DEFAULT); if (newArray == NULL) { assert(dvmCheckException(dvmThreadSelf())); RETURN_VOID(); |