| 37 | } |
| 38 | |
| 39 | void EmmyFacade::ReadyLuaHook(lua_State *L, lua_Debug *ar) { |
| 40 | if (!Get().readyHook) { |
| 41 | return; |
| 42 | } |
| 43 | Get().readyHook = false; |
| 44 | |
| 45 | auto states = FindAllCoroutine(L); |
| 46 | |
| 47 | for (auto state: states) { |
| 48 | lua_sethook(state, HookLua, LUA_MASKCALL | LUA_MASKLINE | LUA_MASKRET, 0); |
| 49 | } |
| 50 | |
| 51 | lua_sethook(L, HookLua, LUA_MASKCALL | LUA_MASKLINE | LUA_MASKRET, 0); |
| 52 | |
| 53 | auto debugger = Get().GetDebugger(L); |
| 54 | if (debugger) { |
| 55 | debugger->Attach(); |
| 56 | } |
| 57 | |
| 58 | Get().Hook(L, ar); |
| 59 | } |
| 60 | |
| 61 | EmmyFacade::EmmyFacade() |
| 62 | : transporter(nullptr), |
nothing calls this directly
no test coverage detected