| 34 | } |
| 35 | |
| 36 | void LuaRoot::restart() { |
| 37 | shutdown(); |
| 38 | |
| 39 | auto& root = Root::singleton(); |
| 40 | |
| 41 | m_luaEngine = LuaEngine::create(root.configuration()->get("safeScripts").toBool()); |
| 42 | |
| 43 | m_luaEngine->setRecursionLimit(root.configuration()->get("scriptRecursionLimit").toUInt()); |
| 44 | m_luaEngine->setInstructionLimit(root.configuration()->get("scriptInstructionLimit").toUInt()); |
| 45 | m_luaEngine->setProfilingEnabled(root.configuration()->get("scriptProfilingEnabled").toBool()); |
| 46 | m_luaEngine->setInstructionMeasureInterval(root.configuration()->get("scriptInstructionMeasureInterval").toUInt()); |
| 47 | } |
| 48 | |
| 49 | void LuaRoot::shutdown() { |
| 50 | clearScriptCache(); |
no test coverage detected