From 381e8fc05ba935d330948d9529a1019e03ebc77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Mon, 25 Mar 2024 21:05:25 +0800 Subject: [PATCH] fix --- LunaHook/engines/v8/v8.cpp | 3 --- LunaHook/resource/lunajspatch.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/LunaHook/engines/v8/v8.cpp b/LunaHook/engines/v8/v8.cpp index 5d3e4cc..6dbf258 100644 --- a/LunaHook/engines/v8/v8.cpp +++ b/LunaHook/engines/v8/v8.cpp @@ -146,9 +146,6 @@ bool v8runscript_isolate(void* isolate){ void v8runscript_isolate_bypass(hook_stack* stack, HookParam* hp, uintptr_t* data, uintptr_t* split, size_t* len){ hp->type=HOOK_EMPTY;hp->text_fun=nullptr; - static bool runonce=false; - if(runonce)return; - runonce=true; auto isolate=(void*)stack->ARG2;//测试正确,且和v8::Isolate::GetCurrent结果相同 v8runscript_isolate(isolate); diff --git a/LunaHook/resource/lunajspatch.js b/LunaHook/resource/lunajspatch.js index 9f01f92..4987c90 100644 --- a/LunaHook/resource/lunajspatch.js +++ b/LunaHook/resource/lunajspatch.js @@ -107,4 +107,4 @@ function retryinject(times){ //非主线程,甚至没有window对象,会弹窗报错 } } -setTimeout(retryinject,1000,3); \ No newline at end of file +retryinject(3) \ No newline at end of file