| 565 | } |
| 566 | |
| 567 | void Debugger::ClearCache() const { |
| 568 | if (!currentL) { |
| 569 | return; |
| 570 | } |
| 571 | |
| 572 | auto L = currentL; |
| 573 | |
| 574 | |
| 575 | lua_getfield(L, LUA_REGISTRYINDEX, CACHE_TABLE_NAME); |
| 576 | if (!lua_isnil(L, -1)) { |
| 577 | lua_pushnil(L); |
| 578 | lua_setfield(L, LUA_REGISTRYINDEX, CACHE_TABLE_NAME); |
| 579 | } |
| 580 | lua_pop(L, 1); |
| 581 | } |
| 582 | |
| 583 | void Debugger::DoAction(DebugAction action) { |
| 584 | // 锁加到这里 |
nothing calls this directly
no test coverage detected