summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp8
-rw-r--r--indra/llplugin/llpluginclassmedia.h8
-rw-r--r--indra/llplugin/llpluginclassmediaowner.h1
-rw-r--r--indra/llplugin/llpluginprocesschild.cpp6
4 files changed, 20 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;