mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
Refactor: preload event
This commit is contained in:
1 parent
c11891e718
commit
c7d9336b70
1 file changed
+7
-8
@@ -14,13 +14,6 @@ namespace JuiceAgent {
|
||||
bool Agent::init(JavaVM* jvm, JNIEnv* env, jvmtiEnv* jvmti) {
|
||||
PLOGI << "JuiceAgent Native EntryPoint Invoked!";
|
||||
|
||||
// PreLoad Event
|
||||
eventbus.post(EventPreLoad{
|
||||
.jvm = jvm,
|
||||
.env = env,
|
||||
.jvmti = jvmti
|
||||
});
|
||||
|
||||
// ======== neccessary environment check ========
|
||||
if (jvm == nullptr) {
|
||||
PLOGE << "Failed to initialize JuiceAgent: jvm is null";
|
||||
@@ -37,9 +30,15 @@ namespace JuiceAgent {
|
||||
|
||||
set_jvm(jvm);
|
||||
set_jvmti(jvmti);
|
||||
|
||||
PLOGD << "env: " << env << ", jvmti: " << jvmti;
|
||||
|
||||
// PreLoad Event
|
||||
eventbus.post(EventPreLoad{
|
||||
.jvm = jvm,
|
||||
.env = env,
|
||||
.jvmti = jvmti
|
||||
});
|
||||
|
||||
// ======== Application ability ========
|
||||
jvmtiCapabilities caps{};
|
||||
caps.can_get_bytecodes = 1;
|
||||
|
||||
Reference in new issue
Block a user