Revert "Make object allocation entrypoints only take a class."
960-default-smali64 is failing.
This reverts commit 2b615ba29c4dfcf54aaf44955f2eac60f5080b2e.
Change-Id: Iebb8ee5a917fa84c5f01660ce432798524d078ef
diff --git a/runtime/arch/stub_test.cc b/runtime/arch/stub_test.cc
index ee65fa8..9e385f8 100644
--- a/runtime/arch/stub_test.cc
+++ b/runtime/arch/stub_test.cc
@@ -1062,8 +1062,12 @@
EXPECT_FALSE(self->IsExceptionPending());
{
- size_t result = Invoke3(reinterpret_cast<size_t>(c.Get()), 0u, 0U,
- StubTest::GetEntrypoint(self, kQuickAllocObjectWithChecks),
+ // Use an arbitrary method from c to use as referrer
+ size_t result = Invoke3(static_cast<size_t>(c->GetDexTypeIndex().index_), // type_idx
+ // arbitrary
+ reinterpret_cast<size_t>(c->GetVirtualMethod(0, kRuntimePointerSize)),
+ 0U,
+ StubTest::GetEntrypoint(self, kQuickAllocObject),
self);
EXPECT_FALSE(self->IsExceptionPending());
@@ -1074,6 +1078,8 @@
}
{
+ // We can use null in the second argument as we do not need a method here (not used in
+ // resolved/initialized cases)
size_t result = Invoke3(reinterpret_cast<size_t>(c.Get()), 0u, 0U,
StubTest::GetEntrypoint(self, kQuickAllocObjectResolved),
self);
@@ -1086,6 +1092,8 @@
}
{
+ // We can use null in the second argument as we do not need a method here (not used in
+ // resolved/initialized cases)
size_t result = Invoke3(reinterpret_cast<size_t>(c.Get()), 0u, 0U,
StubTest::GetEntrypoint(self, kQuickAllocObjectInitialized),
self);