Commit a4fc9bec authored by swift_gan's avatar swift_gan

revert to call backup method direct, because callOriginMethod dose not deal

parent a87c367a
...@@ -590,12 +590,12 @@ public class HookerDexMaker { ...@@ -590,12 +590,12 @@ public class HookerDexMaker {
} }
// get pre-created Local with a matching typeId // get pre-created Local with a matching typeId
if (mReturnTypeId.equals(TypeId.VOID)) { if (mReturnTypeId.equals(TypeId.VOID)) {
code.invokeStatic(mCallBackupMethodId, null, allArgsLocals); code.invokeStatic(mBackupMethodId, null, allArgsLocals);
// TODO maybe keep preset result to do some magic? // TODO maybe keep preset result to do some magic?
code.invokeVirtual(setResultMethodId, null, param, nullObj); code.invokeVirtual(setResultMethodId, null, param, nullObj);
} else { } else {
Local returnedResult = resultLocals.get(mReturnTypeId); Local returnedResult = resultLocals.get(mReturnTypeId);
code.invokeStatic(mCallBackupMethodId, returnedResult, allArgsLocals); code.invokeStatic(mBackupMethodId, returnedResult, allArgsLocals);
// save returnedResult to resultObj as a Object // save returnedResult to resultObj as a Object
autoBoxIfNecessary(code, resultObj, returnedResult); autoBoxIfNecessary(code, resultObj, returnedResult);
// save resultObj to param // save resultObj to param
...@@ -676,11 +676,11 @@ public class HookerDexMaker { ...@@ -676,11 +676,11 @@ public class HookerDexMaker {
// call backup and return // call backup and return
code.mark(noHookReturn); code.mark(noHookReturn);
if (mReturnTypeId.equals(TypeId.VOID)) { if (mReturnTypeId.equals(TypeId.VOID)) {
code.invokeStatic(mCallBackupMethodId, null, allArgsLocals); code.invokeStatic(mBackupMethodId, null, allArgsLocals);
code.returnVoid(); code.returnVoid();
} else { } else {
Local result = resultLocals.get(mReturnTypeId); Local result = resultLocals.get(mReturnTypeId);
code.invokeStatic(mCallBackupMethodId, result, allArgsLocals); code.invokeStatic(mBackupMethodId, result, allArgsLocals);
code.returnValue(result); code.returnValue(result);
} }
} }
......
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