diff options
author | Monroe Linden <monroe@lindenlab.com> | 2009-10-05 14:36:26 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2009-10-05 14:36:26 -0700 |
commit | 0c475833994d1b89bbd5a09872eea73c32c8c5c3 (patch) | |
tree | 0f444249f59480e47e8cbfe01e964201db4f696a | |
parent | 5d8314f5c16017144863a23a0c3aa374e7ca9682 (diff) |
Fix for EXT-1301 (media_plugin_webkit dialog opens on loading the login page and cannot be closed).
-rw-r--r-- | indra/newview/llviewermedia.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llviewermedia.h | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 100a34291b..d5c75b82a7 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -589,6 +589,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mPriority(LLPluginClassMedia::PRIORITY_UNLOADED), mDoNavigateOnLoad(false), mDoNavigateOnLoadServerRequest(false), + mMediaSourceFailedInit(false), mIsUpdated(false) { @@ -703,7 +704,7 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type) LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height) { std::string plugin_basename = LLMIMETypes::implType(media_type); - + if(plugin_basename.empty()) { LL_WARNS("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL; @@ -774,6 +775,9 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) return false; } + // If we got here, we want to ignore previous init failures. + mMediaSourceFailedInit = false; + LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight); if (media_source) @@ -787,6 +791,9 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) return true; } + // Make sure the timer doesn't try re-initing this plugin repeatedly until something else changes. + mMediaSourceFailedInit = true; + return false; } @@ -1147,7 +1154,7 @@ bool LLViewerMediaImpl::canNavigateBack() ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::update() { - if(mMediaSource == NULL) + if(mMediaSource == NULL && !mMediaSourceFailedInit) { if(mPriority != LLPluginClassMedia::PRIORITY_UNLOADED) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 775f72d56f..8064320a85 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -280,6 +280,7 @@ public: LLPluginClassMedia::EPriority mPriority; bool mDoNavigateOnLoad; bool mDoNavigateOnLoadServerRequest; + bool mMediaSourceFailedInit; private: |