summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-14 01:03:03 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-14 01:03:03 +0000
commit95ddf98879dd04f068cf4152387b55a274b38bd5 (patch)
tree8caea01d391febe625a6c9d83c65de04be3e1c87 /webkit/glue
parentfd220e6008ba976de0de1a5dd5c10576c2cd8450 (diff)
downloadchromium_src-95ddf98879dd04f068cf4152387b55a274b38bd5.zip
chromium_src-95ddf98879dd04f068cf4152387b55a274b38bd5.tar.gz
chromium_src-95ddf98879dd04f068cf4152387b55a274b38bd5.tar.bz2
Call np_getentrypoints after np_initialize on the Mac
This matches the behavior of other Mac browsers, and QuickTime at least expects the calls in that order or the function list it gives back will be incomplete (NP_GetValue and NP_SetValue missing) BUG=24999 TEST=See testcase in bug; movie should play. Review URL: http://codereview.chromium.org/386036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31980 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/plugins/plugin_lib.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc
index 05c12e9..1ca03ed 100644
--- a/webkit/glue/plugins/plugin_lib.cc
+++ b/webkit/glue/plugins/plugin_lib.cc
@@ -109,6 +109,13 @@ NPError PluginLib::NP_Initialize() {
&plugin_funcs_);
#else
NPError rv = entry_points_.np_initialize(host->host_functions());
+#if defined(OS_MACOSX)
+ // On the Mac, we need to get entry points after calling np_initialize to
+ // match the behavior of other browsers.
+ if (rv == NPERR_NO_ERROR) {
+ rv = entry_points_.np_getentrypoints(&plugin_funcs_);
+ }
+#endif // OS_MACOSX
#endif
LOG(INFO) << "PluginLib::NP_Initialize(" << web_plugin_info_.path.value() <<
"): result=" << rv;
@@ -190,11 +197,11 @@ bool PluginLib::Load() {
if (rv) {
plugin_funcs_.size = sizeof(plugin_funcs_);
plugin_funcs_.version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
-#if !defined(OS_LINUX) && !defined(OS_FREEBSD)
+#if !defined(OS_LINUX) && !defined(OS_FREEBSD) && !defined(OS_MACOSX)
if (entry_points_.np_getentrypoints(&plugin_funcs_) != NPERR_NO_ERROR)
rv = false;
#else
- // On Linux, we get the plugin entry points during NP_Initialize.
+ // On Linux and Mac, we get the plugin entry points during NP_Initialize.
#endif
}