Fix ObjectInitFromCode to do callee frame setup
Change-Id: I70512c85a3a810fd672495b86655c215a07bb977
diff --git a/src/runtime_support.cc b/src/runtime_support.cc
index 5550c2f..ad01f4d 100644
--- a/src/runtime_support.cc
+++ b/src/runtime_support.cc
@@ -40,7 +40,8 @@
LOG(INFO) << "Info: " << info;
}
-void ObjectInitFromCode(Object* o) {
+extern "C" uint32_t artObjectInitFromCode(Object* o, Thread* self, Method** sp) {
+ FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
Class* c = o->GetClass();
if (UNLIKELY(c->IsFinalizable())) {
Heap::AddFinalizerReference(o);
@@ -50,6 +51,7 @@
* here and branch to actual compiled object.<init> to handle any
* breakpoint/logging activites if either is active.
*/
+ return self->IsExceptionPending() ? -1 : 0;
}
// Return value helper for jobject return types