Commit 97828311 authored by swift_gan's avatar swift_gan

add empty trt catch to avoid inline

parent 786ed74f
......@@ -249,6 +249,13 @@ public class HookerDexMaker {
mBackupMethodId = mHookerTypeId.getMethod(mReturnTypeId, METHOD_NAME_BACKUP, mParameterTypeIds);
Code code = mDexMaker.declare(mBackupMethodId, Modifier.PUBLIC | Modifier.STATIC);
Map<TypeId, Local> resultLocals = createResultLocals(code);
//add a try cache block avoid inline
Label tryCatchBlock = new Label();
// start of try
code.addCatchClause(throwableTypeId, tryCatchBlock);
// do nothing
if (mReturnTypeId.equals(TypeId.VOID)) {
code.returnVoid();
......@@ -264,6 +271,7 @@ public class HookerDexMaker {
// just call backup and return its result
Local[] allArgsLocals = createParameterLocals(code);
Map<TypeId, Local> resultLocals = createResultLocals(code);
if (mReturnTypeId.equals(TypeId.VOID)) {
code.invokeStatic(mBackupMethodId, null, allArgsLocals);
code.returnVoid();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment