diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-08-10 20:44:52 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-08-10 20:44:52 +0300 |
commit | 8213cc896c74ca08ee231aa557eac302445c933e (patch) | |
tree | cf8ec39ebf2b88124ea3fa0ebee6fc7788231821 | |
parent | 6abf2ca503949345f12da03ed76848d703158f6f (diff) |
SL-3704 Give plugins some time to terminate
requestExit() doesn't close CEF, command sets CEF into closing state which will be processed on update()
-rw-r--r-- | indra/llplugin/llpluginprocesschild.cpp | 12 | ||||
-rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp index c5304d2ccf..d93ec8cf4b 100644 --- a/indra/llplugin/llpluginprocesschild.cpp +++ b/indra/llplugin/llpluginprocesschild.cpp @@ -225,6 +225,18 @@ void LLPluginProcessChild::idle(void) } setState(STATE_UNLOADED); } + + if (mInstance) + { + // Provide some time to the plugin + // example: CEF on "cleanup" sets shutdown request, but it still needs idle loop to actually shutdown + LLPluginMessage message("base", "idle"); + message.setValueReal("time", PLUGIN_IDLE_SECONDS); + sendMessageToPlugin(message); + + mInstance->idle(); + } + break; case STATE_UNLOADED: diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 9cddf5b481..0bb62d79ff 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -460,7 +460,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (message_name == "cleanup") { - mVolumeCatcher.setVolume(0); // Hack: masks CEF exit issues mCEFLib->requestExit(); } else if (message_name == "force_exit") |