diff options
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/WebCore/plugins/qt/PluginPackageQt.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp index 98c575896..c5112f525 100644 --- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp +++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp @@ -38,8 +38,19 @@ namespace WebCore { bool PluginPackage::fetchInfo() { - if (!load()) - return false; + if (!m_module) { + m_module = new QLibrary((QString)m_path); + m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint); + if (!m_module->load()) { + LOG(Plugins, "%s not loaded (%s)", m_path.utf8().data(), + m_module->errorString().toLatin1().constData()); + return false; + } + // This is technically wrong (not matched by a decrement), but + // it matches the previous behavior (fetchInfo calling load) and + // prevents crashes in flash due to unload+load. + m_loadCount++; + } NPP_GetValueProcPtr gv = (NPP_GetValueProcPtr)m_module->resolve("NP_GetValue"); NP_GetMIMEDescriptionFuncPtr gm = @@ -61,7 +72,6 @@ bool PluginPackage::fetchInfo() determineModuleVersionFromDescription(); setMIMEDescription(String::fromUTF8(gm())); - m_infoIsFromCache = false; return true; } @@ -155,12 +165,14 @@ bool PluginPackage::load() if (isPluginBlacklisted()) return false; - m_module = new QLibrary((QString)m_path); - m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint); - if (!m_module->load()) { - LOG(Plugins, "%s not loaded (%s)", m_path.utf8().data(), + if (!m_module) { + m_module = new QLibrary((QString)m_path); + m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint); + if (!m_module->load()) { + LOG(Plugins, "%s not loaded (%s)", m_path.utf8().data(), m_module->errorString().toLatin1().constData()); - return false; + return false; + } } m_isLoaded = true; |
