summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterluascripts.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2024-06-11 12:27:22 +0300
committerGitHub <noreply@github.com>2024-06-11 12:27:22 +0300
commit3d1aac4f5c369e9d402c41f1c790d9015f7c7773 (patch)
treef911416d189a02775a21e3fc94b4bf8027e4ada9 /indra/newview/llfloaterluascripts.cpp
parentdbc785d4433080ca49b9cd899c756c9700a1a794 (diff)
parent7331d281e84da73907e1067b03ad4662991f4808 (diff)
Merge pull request #1481 from secondlife/lua-ui-callbacks
Add trusted flag to UI callbacks, so not everything is accessible from the script
Diffstat (limited to 'indra/newview/llfloaterluascripts.cpp')
-rw-r--r--indra/newview/llfloaterluascripts.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llfloaterluascripts.cpp b/indra/newview/llfloaterluascripts.cpp
index 39d5816b0d..189ee0c9d1 100644
--- a/indra/newview/llfloaterluascripts.cpp
+++ b/indra/newview/llfloaterluascripts.cpp
@@ -41,22 +41,22 @@ LLFloaterLUAScripts::LLFloaterLUAScripts(const LLSD &key)
mUpdateTimer(new LLTimer()),
mContextMenuHandle()
{
- mCommitCallbackRegistrar.add("Script.OpenFolder", [this](LLUICtrl*, const LLSD &userdata)
+ mCommitCallbackRegistrar.add("Script.OpenFolder", {[this](LLUICtrl*, const LLSD &userdata)
{
if (mScriptList->hasSelectedItem())
{
std::string target_folder_path = std::filesystem::path((mScriptList->getFirstSelected()->getColumn(1)->getValue().asString())).parent_path().string();
gViewerWindow->getWindow()->openFolder(target_folder_path);
}
- });
- mCommitCallbackRegistrar.add("Script.Terminate", [this](LLUICtrl*, const LLSD &userdata)
+ }, cb_info::UNTRUSTED_BLOCK });
+ mCommitCallbackRegistrar.add("Script.Terminate", {[this](LLUICtrl*, const LLSD &userdata)
{
if (mScriptList->hasSelectedItem())
{
std::string coro_name = mScriptList->getSelectedValue();
LLCoros::instance().killreq(coro_name);
}
- });
+ }, cb_info::UNTRUSTED_BLOCK });
}