From 711242a5430ff9c0a6498dd372807ba1771df5f8 Mon Sep 17 00:00:00 2001 From: "craig.schlenter@chromium.org" Date: Mon, 22 Feb 2010 15:11:21 +0000 Subject: Linux: correctly handle single byte value for NPPVpluginNeedsXEmbed. BUG=none TEST=none Review URL: http://codereview.chromium.org/650135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39596 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index 3e4f607..2f0948b 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc @@ -116,9 +116,9 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() { DCHECK(!windowed_handle_); DCHECK(!plug_); - // NPP_GetValue() will write 4 bytes of data to this variable. Don't use a - // single byte bool, use an int instead. - int xembed; + // NPP_GetValue() might write 4 bytes of data to this variable. Don't use a + // single byte bool, use an int instead and make sure it is initialized. + int xembed = 0; NPError err = instance_->NPP_GetValue(NPPVpluginNeedsXEmbed, &xembed); if (err != NPERR_NO_ERROR || !xembed) { NOTIMPLEMENTED() << " windowed plugin but without xembed."; -- cgit v1.1