summaryrefslogtreecommitdiff
path: root/indra
AgeCommit message (Collapse)Author
2024-08-21mac build fixMnikolenko Productengine
2024-08-21Merge branch 'release/luau-scripting' into lua-inventoryMaxim Nikolenko
2024-08-21Add item limit for collectDescendentsIf func; add demo scriptMnikolenko Productengine
2024-08-21Improve diagnostic output for Lua atexit() functions.Nat Goodspeed
2024-08-21Suppress ~LuaStackDelta() verification during stack unwinding.Nat Goodspeed
Otherwise, an exception raised in the block containing a LuaStackDelta instance -- that might be caught -- would result in an LL_ERRS() crash. We can't expect a block exited via exception to keep its contract wrt the Lua data stack.
2024-08-20Fix a couple more set_interrupts_counter() calls.Nat Goodspeed
2024-08-20Defend timers.Timer(iterate=True) against long callbacks.Nat Goodspeed
Specifically, defend against a callback that runs so long it suspends at a point after the next timer tick.
2024-08-20Fix for #2237: intermittent Lua data stack overflow.Nat Goodspeed
Use a static unordered_map to allow a function receiving (lua_State* L) to look up the LuaState instance managing that lua_State. We've thought about this from time to time already. LuaState's constructor creates the map entry; its destructor removes it; the new static getParent(lua_State* L) method performs the lookup. Migrate lluau::set_interrupts_counter() and check_interrupts_counter() into LuaState member functions. Add a new mInterrupts counter for them. Importantly, LuaState::check_interrupts_counter(), which is indirectly called by a lua_callbacks().interrupt function, no longer performs any Lua stack operations. Empirically, it seems the Lua engine is capable of interrupting itself at a moment when re-entry confuses it. Change previous lluau::set_interrupts_counter(L, 0) calls to LuaState::getParent(L).set_interrupts_counter(0). Also add LuaStackDelta class, and a lua_checkdelta() helper macro, to verify that the Lua data stack depth on exit from a block differs from the depth on entry by exactly the expected amount. Sprinkle lua_checkdelta() macros in likely places.
2024-08-20Fix TempSet to use type VAR to store mOldValue.Nat Goodspeed
In fact we set mOldValue from mVar, and restore mVar from mOldValue, so the VAR type makes the most sense. The previous way, you'd get actual errors if you tried to use TempSet(pointervar, nullptr): that declared mOldValue to be nullptr_t, which you can't initialize from mVar.
2024-08-20Add LL::scope_exitNat Goodspeed
2024-08-20Add collectDescendentsIf api for LuaMnikolenko Productengine
2024-08-15First batch of Inventory api; raise interrupts limitMnikolenko Productengine
2024-08-15Merge branch 'release/luau-scripting' into viewer-lua-2237Nat Goodspeed
2024-08-15Introduce lluau_checkstack(L, n); use instead of luaL_checkstack().Nat Goodspeed
luaL_checkstack() accepts a third parameter which is included in the stack overflow error message. We've been passing nullptr, leading to messages of the form "stack overflow ((null))". lluau_checkstack() implicitly passes __FUNCTION__, so we can distinguish which underlying luaL_checkstack() call encountered the stack overflow condition. Also, when calling each atexit() function, pass Luau's debug.traceback() function as the lua_pcall() error handler. This should help diagnose errors in atexit() functions.
2024-08-13clean up and add commentMnikolenko Productengine
2024-08-13Merge pull request #2265 from secondlife/lua-groupchat-throttleMaxim Nikolenko
Add Throttle and LogThrottle classes to manage throttled APIs.
2024-08-12Add virtual destructor to Throttle class.Nat Goodspeed
2024-08-12Add Throttle and LogThrottle classes to manage throttled APIs.Nat Goodspeed
2024-08-12Merge branch 'release/luau-scripting' into lua-groupchatMaxim Nikolenko
2024-08-09add demo script for sending group chat messagesMnikolenko Productengine
2024-08-09Lua api for sending group messagesMnikolenko Productengine
2024-08-08Ensure that the flycam stays near moving avatar.Nat Goodspeed
2024-08-07Move #include "coro_scheduler.h" from llstartup to llappviewer.Nat Goodspeed
2024-08-07Allow smaller minimum timer intervals.Nat Goodspeed
Add test_flycam.lua to exercise the smaller intervals.
2024-08-07Move llcoro::scheduler::use() call from llstartup to llappviewer.Nat Goodspeed
Thanks, Maxim.
2024-08-07Merge branch 'release/luau-scripting' into viewer-lua-smootherNat Goodspeed
2024-08-07Fix omission in login.savedLogins().Nat Goodspeed
Also add Region.lua.
2024-08-07Merge branch 'release/luau-scripting' into viewer-lua-smootherNat Goodspeed
2024-08-07Rename 'UI' 'getParents' op to 'getTopMenus', add UI.lua function.Nat Goodspeed
Also update the 'UI' help text to reflect its more general nature. Mention 0-relative rank in the xxToolbarBtn operation help text.
2024-08-07Merge branch 'release/luau-scripting' into viewer-lua-smootherNat Goodspeed
2024-08-06Merge branch 'release/luau-scripting' into viewer-lua-smootherNat Goodspeed
2024-08-06Introduce a custom coroutine/fiber scheduler to prioritize UI.Nat Goodspeed
The viewer's main thread's main fiber is responsible for coordinating just about everything. With the default round_robin fiber scheduling algorithm, launching too many additional fibers could starve the main fiber, resulting in visible lag. This custom scheduler tracks when it switches to and from the main fiber, and at each context switch, how long it's been since the last time the main fiber ran. If that exceeds a certain timeslice, it jumps the main fiber to the head of the queue and resumes that instead of any other ready fiber.
2024-08-06code clean upMnikolenko Productengine
2024-08-06Merge branch 'release/luau-scripting' into lua-ui-visibilityMaxim Nikolenko
2024-08-05Allow getting the list of floater names, hide top menu items; add demo scriptMnikolenko Productengine
2024-08-05Fix a couple problems with "LLPanelLogin" listener (thanks Maxim!).Nat Goodspeed
Convert plain grid (e.g. "agni") to domain form (e.g. "util.agni.lindenlab.com"). Fix a typo in `savedLogins()`: "login_list", not "login.list". login.lua now returns a table with two functions: `login.login()` and `login.savedLogins()`. Defend Lua caller against trying to engage login features too late in startup sequence: in addition to waiting for "STATE_LOGIN_WAIT", produce an error if `startup.state()` is beyond that state. Since by then `LLPanelLogin` is destroyed, `leap.request("LLPanelLogin", ...)` would get no response, causing the calling Lua script to hang until viewer shutdown.
2024-08-02Add 'LLPanelLogin' 'login', 'savedLogins' operations.Nat Goodspeed
'login' accepts optional 'username', 'slurl', 'grid'. 'savedLogins' returns the list of saved usernames in both display form and internal form. Make LLPanelLogin::getUserName() accept (const LLPointer<LLCredential>&). There's a whole separate discussion pending as to whether const LLPointer<T> should provide access to non-const T methods. Similarly, make LLCredential::getIdentifier() a const method. These two changes enable read-only access to credentials. Make LLPanelLogin methods capture and reuse LLGridManager::instance() as appropriate. Add require/login.lua and test_login.lua.
2024-08-02Search --luafile script on LuaCommandPath.Nat Goodspeed
2024-08-02Merge branch 'release/luau-scripting' into lua-login2Nat Goodspeed
2024-08-02Lua api for showing/hiding floater; rename demo scriptsMnikolenko Productengine
2024-08-02Lua api for adjusting toolbarsMnikolenko Productengine
2024-08-02Add 'UI' 'getParents' op to list top-menu 'parent_menu' names.Nat Goodspeed
2024-08-01Add UI.callables() and corresponding entry point.Nat Goodspeed
2024-08-01Merge remote-tracking branch 'origin/lua-top-menu' into lua-callables.Nat Goodspeed
We want to base lua-callables on lua-top-menu.
2024-08-01Add lua_push(), lua_to(), lua_[gs]etfieldv(), lua_raw[gs]etfield().Nat Goodspeed
Leverage C++ overloads to allow use of generic function names disambiguated by argument type. This allows using templates for certain common operation sequences.
2024-07-31Represent the many "LLAgent" "setCameraParams" args in an array.nat-goodspeed
This encapsulates the boilerplate associated with passing each distinct parameter to its corresponding LLFollowCamMgr method.
2024-07-29Merge branch 'release/luau-scripting' into lua-top-menuMaxim Nikolenko
2024-07-29Merge branch 'release/luau-scripting' into lua-cameraMaxim Nikolenko
2024-07-29Update expired cert in integration test (#2140)Maxim Nikolenko
see fe8c976 for more info Co-authored-by: Andrey Lihatskiy <alihatskiy@productengine.com>
2024-07-26Add api for more script camera paramsMnikolenko Productengine