diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2026-09-22 17:35:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-22 17:35:03 -0400 |
| commit | f3fba78d9185a2385cc6c5226b7a87fddff826dd (patch) | |
| tree | 4d04ad5876c69ec0b3203dec69c711161fa7f934 /indra/llplugin | |
| parent | cc5d3dd3cd653971fff16cf2bc1d380edd5ea7f2 (diff) | |
| parent | 125dfba5f94191fc99d1c511d190d6a9f2d9d2f1 (diff) | |
Merge pull request #6357 from secondlife/pepper/chat-merge-26.5
Merge `release/26.5` into `project/chat-modernization`
Diffstat (limited to 'indra/llplugin')
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 8 | ||||
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 8 | ||||
| -rw-r--r-- | indra/llplugin/llpluginclassmediaowner.h | 1 | ||||
| -rw-r--r-- | indra/llplugin/llpluginprocesschild.cpp | 6 | ||||
| -rw-r--r-- | indra/llplugin/llpluginprocessparent.cpp | 11 |
5 files changed, 31 insertions, 3 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 2269d7adc8..540bd77b7d 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -1309,8 +1309,16 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) else if (message_name == "file_download") { mFileDownloadFilename = message.getValue("filename"); + mFileDownloadProgressPercent = 0; + mFileDownloadProgressComplete = false; mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_FILE_DOWNLOAD); } + else if (message_name == "file_download_progress") + { + mFileDownloadProgressPercent = message.getValueS32("percent"); + mFileDownloadProgressComplete = message.getValueBoolean("complete"); + mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_FILE_DOWNLOAD_PROGRESS); + } else if(message_name == "debug_message") { mDebugMessageText = message.getValue("message_text"); diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 153a7eb823..1d886f16f9 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -324,9 +324,13 @@ public: std::string getHoverText() const { return mHoverText; }; std::string getHoverLink() const { return mHoverLink; }; - // these are valid during MEDIA_EVENT_LINK_HOVERED + // These are valid during MEDIA_EVENT_FILE_DOWNLOAD std::string getFileDownloadFilename() const { return mFileDownloadFilename; } + // these are valid during MEDIA_EVENT_FILE_DOWNLOAD_PROGRESS + int getFileDownloadProgressPercent() const { return mFileDownloadProgressPercent; } + bool getFileDownloadProgressComplete() const { return mFileDownloadProgressComplete; } + const std::string& getMediaName() const { return mMediaName; }; std::string getMediaDescription() const { return mMediaDescription; }; @@ -488,6 +492,8 @@ protected: std::string mHoverText; std::string mHoverLink; std::string mFileDownloadFilename; + int mFileDownloadProgressPercent = 0; + bool mFileDownloadProgressComplete = false; bool mIsMultipleFilePick; ///////////////////////////////////////// diff --git a/indra/llplugin/llpluginclassmediaowner.h b/indra/llplugin/llpluginclassmediaowner.h index a75d0b9960..76f93be3eb 100644 --- a/indra/llplugin/llpluginclassmediaowner.h +++ b/indra/llplugin/llpluginclassmediaowner.h @@ -64,6 +64,7 @@ public: MEDIA_EVENT_AUTH_REQUEST, // The plugin wants to display an auth dialog MEDIA_EVENT_FILE_DOWNLOAD, // the plugin wants to download a file + MEDIA_EVENT_FILE_DOWNLOAD_PROGRESS, // file download progress/completion update MEDIA_EVENT_DEBUG_MESSAGE, // plugin sending back debug information for host to process diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp index a854ced7aa..6c15200886 100644 --- a/indra/llplugin/llpluginprocesschild.cpp +++ b/indra/llplugin/llpluginprocesschild.cpp @@ -241,8 +241,10 @@ void LLPluginProcessChild::idle(void) case STATE_UNLOADED: killSockets(); - delete mInstance; - mInstance = NULL; + // Deleting mInstance here causes apr_dso_unload() to trigger a fault on SLPlugin when it unloads libcef + // Instead, let the process exit on its own and allow the OS reclaim the memory to prevent the error + //delete mInstance; + //mInstance = NULL; setState(STATE_DONE); break; diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index 4f55d75e7d..2029497790 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -508,6 +508,16 @@ void LLPluginProcessParent::idle(void) else if (!mProcess && !mProcessCreationRequested) { mProcessCreationRequested = true; +#if LL_DARWIN + // On darwin process should be created from main thread, otherwise it can + // cause a fork-lock deadlock. Relevant to both, boost and apr. + // Alternatively can remake process creation to use posix_spawn + if (!(mProcess = LLProcess::create(mProcessParams))) + { + mProcessCreationRequested = false; + errorState(); + } +#else LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop"); // *NOTE: main_queue->postTo casts this refcounted smart pointer to a weak // pointer @@ -558,6 +568,7 @@ void LLPluginProcessParent::idle(void) errorState(); } } +#endif } if (mProcess) |
