(class_file: &mut Classfile)
| 144 | } |
| 145 | |
| 146 | unsafe fn add_native_stack_params_method(class_file: &mut Classfile) { |
| 147 | // Create native stackParamFillInStackTrace(Thread) |
| 148 | let sp_fill_meth_name_idx = utf8_const(class_file, "stackParamFillInStackTrace"); |
| 149 | let meth_thread_ret_throwable_idx = utf8_const(class_file, "(Ljava/lang/Thread;)Ljava/lang/Throwable;"); |
| 150 | class_file.methods.push(Method { |
| 151 | access_flags: AccessFlags { flags: MethodAccessFlags::Private as u16 + MethodAccessFlags::Native as u16 }, |
| 152 | name_index: ConstantPoolIndex { idx: sp_fill_meth_name_idx }, |
| 153 | descriptor_index: ConstantPoolIndex { idx: meth_thread_ret_throwable_idx }, |
| 154 | attributes: Vec::new() |
| 155 | }); |
| 156 | } |
| 157 | |
| 158 | unsafe fn update_fill_method(class_file: &mut Classfile) -> Result<(), String> { |
| 159 | // Change existing fillInStackTrace to call stackParamFillInStackTrace(Thread) right after fillInStackTrace(0) |
no test coverage detected