mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
Perf & Fix: reduce ClassFileLoadHook overhead and fix retransform patch path
- Skip mutable event dispatch when no mutable listeners exist (hot path) - Wire retransformClass bytecode into pendingRetransform so patches are applied - Guard pendingRetransform with its mutex; check jvmti Allocate result - Store global refs in captured ClassFileData and release on re-capture - Add null/exception checks in defineClass/getLoadedClasses - Extract shared find_class_by_internal_name helper - Use CONFIGURE_DEPENDS for CMake globs; guard InitLogger; delete leaked jArgs
This commit is contained in:
1 parent
8cf2b8330c
commit
bb5b215a33
10 files changed
+198
-130
No files matched your search
@@ -41,6 +41,9 @@ bool invoke_juiceagent_init(JNIEnv* env, const LoaderConfig& config) {
|
||||
// Call the static method
|
||||
env->CallStaticVoidMethod(cls, method_id, jArgs);
|
||||
|
||||
// Release the local jstring reference
|
||||
env->DeleteLocalRef(jArgs);
|
||||
|
||||
// Check for exceptions
|
||||
if (check_and_clear_exception(env, "CallStaticVoidMethod")) {
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user