Reduce unbearable notification span when a plugin fails to load
This commit is contained in:
@@ -1551,16 +1551,22 @@ void LLViewerMedia::proxyWindowClosed(const std::string &uuid)
|
||||
// static
|
||||
void LLViewerMedia::createSpareBrowserMediaSource()
|
||||
{
|
||||
static bool failedLoading = false;
|
||||
|
||||
// If we don't have a spare browser media source, create one.
|
||||
// However, if PluginAttachDebuggerToPlugins is set then don't spawn a spare
|
||||
// SLPlugin process in order to not be confused by an unrelated gdb terminal
|
||||
// popping up at the moment we start a media plugin.
|
||||
if (!sSpareBrowserMediaSource && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))
|
||||
if (!failedLoading && !sSpareBrowserMediaSource && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))
|
||||
{
|
||||
// The null owner will keep the browser plugin from fully initializing
|
||||
// (specifically, it keeps LLPluginClassMedia from negotiating a size change,
|
||||
// which keeps MediaPluginWebkit::initBrowserWindow from doing anything until we have some necessary data, like the background color)
|
||||
sSpareBrowserMediaSource = LLViewerMediaImpl::newSourceFromMediaType("text/html", NULL, 0, 0);
|
||||
if (!sSpareBrowserMediaSource)
|
||||
{
|
||||
failedLoading = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1916,10 +1922,11 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
|
||||
}
|
||||
|
||||
LL_WARNS_ONCE("Plugin") << "plugin initialization failed for mime type: " << media_type << LL_ENDL;
|
||||
/* There is a reason why ^^ is ONCE
|
||||
LLSD args;
|
||||
args["MIME_TYPE"] = media_type;
|
||||
LLNotificationsUtil::add("NoPlugin", args);
|
||||
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user