diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2013-12-06 13:38:43 -0800 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2013-12-06 13:38:43 -0800 |
commit | e4e23c0b0cfebd01f17732b6686a74f9e437e978 (patch) | |
tree | fed04608bf571680e02d184a354b23c2cae34fec /runtime/mirror/object_test.cc | |
parent | 29c788da9b75f998c5da8f320cd50351b83a3dff (diff) | |
download | art-e4e23c0b0cfebd01f17732b6686a74f9e437e978.zip art-e4e23c0b0cfebd01f17732b6686a74f9e437e978.tar.gz art-e4e23c0b0cfebd01f17732b6686a74f9e437e978.tar.bz2 |
Fix valgrind-test-art-host-gtest-object_test.
This had been failing with the error message:
object_test F 2360 2360 art/runtime/gc/heap-inl.h:139] Check failed: !running_on_valgrind_
Then, this failing DCHECK was removed in a refactoring in
cbb2d20bea2861f244da2e2318d8c088300a3710, I believe.
This change adds back a DCHECK that's equivalent to the old one and
fixes ObjectTest.CheckAndAllocArrayFromCode by replacing a
CheckAndAllocArrayFromCode call with a
CheckAndAllocArrayFromCodeInstrumented call.
Bug: 11670287
Change-Id: Ica2f707b9a9ff48ef973b9e326a4d9786c1781f8
Diffstat (limited to 'runtime/mirror/object_test.cc')
-rw-r--r-- | runtime/mirror/object_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/mirror/object_test.cc b/runtime/mirror/object_test.cc index 8272ff8..3637181 100644 --- a/runtime/mirror/object_test.cc +++ b/runtime/mirror/object_test.cc @@ -221,8 +221,8 @@ TEST_F(ObjectTest, CheckAndAllocArrayFromCode) { java_lang_dex_file_->GetIndexForStringId(*string_id)); ASSERT_TRUE(type_id != NULL); uint32_t type_idx = java_lang_dex_file_->GetIndexForTypeId(*type_id); - Object* array = CheckAndAllocArrayFromCode(type_idx, sort, 3, Thread::Current(), false, - Runtime::Current()->GetHeap()->GetCurrentAllocator()); + Object* array = CheckAndAllocArrayFromCodeInstrumented(type_idx, sort, 3, Thread::Current(), false, + Runtime::Current()->GetHeap()->GetCurrentAllocator()); EXPECT_TRUE(array->IsArrayInstance()); EXPECT_EQ(3, array->AsArray()->GetLength()); EXPECT_TRUE(array->GetClass()->IsArrayClass()); |