diff options
author | Rider Linden <rider@lindenlab.com> | 2015-11-10 13:45:30 -0800 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-11-10 13:45:30 -0800 |
commit | 059925eafb66dc0e2d8ef9c113ca8980a34c655d (patch) | |
tree | 4189394ddc4257f9e448ed878d0b1b15766fa7a4 /indra/llplugin/llpluginclassmedia.cpp | |
parent | a743d939071fbdbbf619f2e282419623da932322 (diff) |
Added code to initiate controlled shutdown of plugins with timeouts for misbeahving plugin.
Diffstat (limited to 'indra/llplugin/llpluginclassmedia.cpp')
-rwxr-xr-x | indra/llplugin/llpluginclassmedia.cpp | 9 |
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; |