summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp')
-rw-r--r--Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp b/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp
index 7bbdaa8..54af967 100644
--- a/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp
+++ b/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp
@@ -58,16 +58,6 @@ NetscapePluginModule::~NetscapePluginModule()
ASSERT(initializedNetscapePluginModules().find(this) == notFound);
}
-void NetscapePluginModule::pluginCreated()
-{
- incrementLoadCount();
-}
-
-void NetscapePluginModule::pluginDestroyed()
-{
- decrementLoadCount();
-}
-
Vector<String> NetscapePluginModule::sitesWithData()
{
Vector<String> sites;
@@ -235,8 +225,21 @@ bool NetscapePluginModule::tryLoad()
// reversed. Failing to follow this order results in crashes (e.g., in Silverlight on Mac and
// in Flash and QuickTime on Windows).
#if PLUGIN_ARCHITECTURE(MAC)
- if (initializeFuncPtr(netscapeBrowserFuncs()) != NPERR_NO_ERROR || getEntryPointsFuncPtr(&m_pluginFuncs) != NPERR_NO_ERROR)
- return false;
+#ifndef NP_NO_CARBON
+ // Plugins (at least QT) require that you call UseResFile on the resource file before loading it.
+ ResFileRefNum currentResourceFile = CurResFile();
+
+ ResFileRefNum pluginResourceFile = m_module->bundleResourceMap();
+ UseResFile(pluginResourceFile);
+#endif
+ bool result = initializeFuncPtr(netscapeBrowserFuncs()) == NPERR_NO_ERROR && getEntryPointsFuncPtr(&m_pluginFuncs) == NPERR_NO_ERROR;
+
+#ifndef NP_NO_CARBON
+ // Restore the resource file.
+ UseResFile(currentResourceFile);
+#endif
+
+ return result;
#elif PLUGIN_ARCHITECTURE(WIN)
if (getEntryPointsFuncPtr(&m_pluginFuncs) != NPERR_NO_ERROR || initializeFuncPtr(netscapeBrowserFuncs()) != NPERR_NO_ERROR)
return false;