* @brief Lua LUA_MASKCOUNT hook that aborts runaway transforms via luaL_error() when the per-engine * deadline expires. */
| 1931 | * deadline expires. |
| 1932 | */ |
| 1933 | void DataModel::FrameBuilder::transformLuaWatchdogHook(lua_State* L, lua_Debug* ar) |
| 1934 | { |
| 1935 | Q_UNUSED(ar) |
| 1936 | |
| 1937 | lua_getfield(L, LUA_REGISTRYINDEX, "__ss_transform__"); |
| 1938 | auto* engine = static_cast<TransformEngine*>(lua_touserdata(L, -1)); |
| 1939 | lua_pop(L, 1); |
| 1940 | |
| 1941 | if (!engine) [[unlikely]] |
| 1942 | return; |
| 1943 | |
| 1944 | if (engine->luaDeadline.hasExpired()) [[unlikely]] |
| 1945 | luaL_error(L, "transform timed out after %d ms", kTransformWatchdogMs); |
| 1946 | } |
| 1947 | |
| 1948 | /** |
| 1949 | * @brief Recompiles transforms + table store for a file player that bypasses ConnectionManager. |
nothing calls this directly
no test coverage detected