diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 20:06:20 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 20:06:20 +0000 |
commit | ae75ff9145f60e983d1a02374d502f54763f3ba7 (patch) | |
tree | 2ea08d0afb8cf0c88939f0e609eb9d4f8bb250e3 /webkit | |
parent | 7a0e72fb105aa4ad05f138bc5231c6e857760f0d (diff) | |
download | chromium_src-ae75ff9145f60e983d1a02374d502f54763f3ba7.zip chromium_src-ae75ff9145f60e983d1a02374d502f54763f3ba7.tar.gz chromium_src-ae75ff9145f60e983d1a02374d502f54763f3ba7.tar.bz2 |
plugins: initialize "type" field of struct
According to the NPAPI docs, the "type" field of this structure
should always be the value NP_SetWindow.
https://developer.mozilla.org/en/NPSetWindowCallbackStruct
It appears things worked without setting it, but valgrind complains
about using uninitialized memory, and it shouldn't hurt to match the
API more carefully.
BUG=71170
Review URL: http://codereview.chromium.org/7977007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc index 422c95d..5f1d2bc 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc +++ b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc @@ -153,6 +153,7 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() { window_.ws_info = new NPSetWindowCallbackStruct; NPSetWindowCallbackStruct* extra = static_cast<NPSetWindowCallbackStruct*>(window_.ws_info); + extra->type = NP_SETWINDOW; extra->display = GDK_DISPLAY(); extra->visual = DefaultVisual(GDK_DISPLAY(), 0); extra->depth = DefaultDepth(GDK_DISPLAY(), 0); |