summaryrefslogtreecommitdiff
path: root/indra/llplugin/llpluginclassmedia.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-11-10 13:45:30 -0800
committerRider Linden <rider@lindenlab.com>2015-11-10 13:45:30 -0800
commit059925eafb66dc0e2d8ef9c113ca8980a34c655d (patch)
tree4189394ddc4257f9e448ed878d0b1b15766fa7a4 /indra/llplugin/llpluginclassmedia.cpp
parenta743d939071fbdbbf619f2e282419623da932322 (diff)
Added code to initiate controlled shutdown of plugins with timeouts for misbeahving plugin.
Diffstat (limited to 'indra/llplugin/llpluginclassmedia.cpp')
-rwxr-xr-xindra/llplugin/llpluginclassmedia.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 53fae52021..85653a0fcc 100755
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -48,7 +48,6 @@ static int nextPowerOf2( int value )
LLPluginClassMedia::LLPluginClassMedia(LLPluginClassMediaOwner *owner)
{
mOwner = owner;
- mPlugin = NULL;
reset();
//debug use
@@ -68,7 +67,7 @@ bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::s
LL_DEBUGS("Plugin") << "dir: " << plugin_dir << LL_ENDL;
LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL;
- mPlugin = new LLPluginProcessParent(this);
+ mPlugin = LLPluginProcessParent::create(this);
mPlugin->setSleepTime(mSleepTime);
// Queue up the media init message -- it will be sent after all the currently queued messages.
@@ -84,10 +83,10 @@ bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::s
void LLPluginClassMedia::reset()
{
- if(mPlugin != NULL)
+ if(mPlugin)
{
- delete mPlugin;
- mPlugin = NULL;
+ mPlugin->requestShutdown();
+ mPlugin.reset();
}
mTextureParamsReceived = false;