diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 00:16:21 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 00:16:21 +0000 |
commit | 0a46d19ce396112b8a42005d1369de30df3bc872 (patch) | |
tree | 12ec49c3e6fb1f56b9b7ca11356382b22cdfc324 | |
parent | 367ead44729ca97c8ed94365b0fe5e24de54fd4f (diff) | |
download | chromium_src-0a46d19ce396112b8a42005d1369de30df3bc872.zip chromium_src-0a46d19ce396112b8a42005d1369de30df3bc872.tar.gz chromium_src-0a46d19ce396112b8a42005d1369de30df3bc872.tar.bz2 |
Call NPP_SetWindow immediately on initialization for Mac QuickTime
BUG=35081
TEST=Fail a login at codeweavers.com/login; QuickTime should not crash.
Review URL: http://codereview.chromium.org/661107
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40078 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_mac.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm index 36acd8b..eac5981 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm +++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm @@ -271,6 +271,12 @@ void WebPluginDelegateImpl::PlatformInitialize() { UpdateIdleEventRate(); #endif plugin_->SetWindow(NULL); + + // QuickTime can crash if it gets other calls (e.g., NPP_Write) before it + // gets a SetWindow call, so call SetWindow (with a 0x0 rect) immediately. + const WebPluginInfo& plugin_info = instance_->plugin_lib()->plugin_info(); + if (plugin_info.name.find(L"QuickTime") != std::wstring::npos) + WindowlessSetWindow(true); } void WebPluginDelegateImpl::PlatformDestroyInstance() { |