Skip to content

Commit

Permalink
* Fixed mask application
Browse files Browse the repository at this point in the history
  • Loading branch information
katherine-hough committed Nov 29, 2023
1 parent 91696df commit 145b3bf
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ public void visitMethodInsn(int opcode, String owner, String name, String desc,
maskUnsafe(opcode, owner, name, desc, isInterface, descWithoutStackFrame);
return;
default:
MaskInfo mask = MaskRegistry.getMask(owner, name, desc);
if (mask != null) {
if (!name.equals("defineClass") || patchAnonymousClasses) {
mask.accept(mv);
return;
}
}
super.visitMethodInsn(opcode, owner, name, desc, isInterface);
fixReturn(owner, name, name, descWithoutStackFrame);
}
}

private void maskUnsafe(
int opcode, String owner, String name, String desc, boolean isInterface, String descWithoutStackFrame) {
MaskInfo mask = MaskRegistry.getMask(owner, name, desc);
if (mask != null) {
if (!name.equals("defineClass") || patchAnonymousClasses) {
mask.accept(mv);
return;
}
}
if (patchAnonymousClasses
&& name.equals("defineAnonymousClass")
&& descWithoutStackFrame.equals("(Ljava/lang/Class;[B[Ljava/lang/Object;)Ljava/lang/Class;")) {
Expand Down

0 comments on commit 145b3bf

Please sign in to comment.