summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 20:17:58 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 20:17:58 +0000
commit05f986e64a1b3b1803c5213e57c08f10cfe1366b (patch)
tree89eafab15792a71fdaec89533daae113e8a6a09c
parent21992d0cbf1bae742d355f6a8ed28563b5533c0d (diff)
downloadchromium_src-05f986e64a1b3b1803c5213e57c08f10cfe1366b.zip
chromium_src-05f986e64a1b3b1803c5213e57c08f10cfe1366b.tar.gz
chromium_src-05f986e64a1b3b1803c5213e57c08f10cfe1366b.tar.bz2
plugins: call SetContainer before we call Initialize
This fix is necessary for the Totem plugin on Linux, which is used for media playing (mp3, quicktime, etc.). BUG=19712,21224 Review URL: http://codereview.chromium.org/196105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26151 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/webplugin_impl.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 7168f2c..7951237 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -208,6 +208,10 @@ bool WebPluginImpl::initialize(WebPluginContainer* container) {
if (!plugin_delegate)
return NULL;
+ // Set the container before Initialize because the plugin may
+ // synchronously call NPN_GetValue to get its container during its
+ // initialization.
+ SetContainer(container);
bool ok = plugin_delegate->Initialize(
plugin_url_, arg_names_, arg_values_, this, load_manually_);
if (!ok) {
@@ -219,7 +223,6 @@ bool WebPluginImpl::initialize(WebPluginContainer* container) {
mime_type_ = actual_mime_type;
delegate_ = plugin_delegate;
- SetContainer(container);
return true;
}