| 315 | } |
| 316 | |
| 317 | void InitCommands() |
| 318 | { |
| 319 | ASSERT_LOW_LAYER(!Inited); |
| 320 | PROFILE_CPU(); |
| 321 | |
| 322 | // Cache existing modules |
| 323 | const auto& modules = BinaryModule::GetModules(); |
| 324 | for (BinaryModule* module : modules) |
| 325 | { |
| 326 | FindDebugCommands(module); |
| 327 | } |
| 328 | |
| 329 | // Link for modules load/reload actions |
| 330 | Scripting::BinaryModuleLoaded.Bind(&FindDebugCommands); |
| 331 | Scripting::ScriptsReloading.Bind(&OnScriptsReloading); |
| 332 | |
| 333 | // Mark as done |
| 334 | Locker.Lock(); |
| 335 | Inited = true; |
| 336 | AsyncTask = nullptr; |
| 337 | Locker.Unlock(); |
| 338 | } |
| 339 | |
| 340 | void EnsureInited() |
| 341 | { |
no test coverage detected