diff options
author | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 21:33:21 +0000 |
---|---|---|
committer | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 21:33:21 +0000 |
commit | d5c8e13701ca6001d2293365d02265693891bc8d (patch) | |
tree | 19b8b668119ec2da5f255f8d57fc8d8a15967985 /chrome | |
parent | 880ea5b3b3739c74d51c249627017a7ccac2db94 (diff) | |
download | chromium_src-d5c8e13701ca6001d2293365d02265693891bc8d.zip chromium_src-d5c8e13701ca6001d2293365d02265693891bc8d.tar.gz chromium_src-d5c8e13701ca6001d2293365d02265693891bc8d.tar.bz2 |
Fix a crash when a plugin file picker window is dismissed. This is a
spot fix--a comprehensive fix will require
http://code.google.com/p/chromium/issues/detail?id=23571
BUG=23774
TEST=upload a file via Flash (example: Gmail, YouTube). The browser should not crash
after you click "OK" to dismiss the file picker.
Review URL: http://codereview.chromium.org/242161
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 11 | ||||
-rw-r--r-- | chrome/browser/plugin_process_host_mac.cc | 6 |
2 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index 142315d..573e0a9 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -330,10 +330,15 @@ PluginProcessHost::~PluginProcessHost() { } #elif defined(OS_MACOSX) // If the plugin process crashed but had windows open at the time, make - // sure that the menu bar is visible if the browser window is not also in - // fullscreen mode. + // sure that the menu bar is visible. + // TODO: only do this if the browser window is not also in fullscreen mode. + // (see http://code.google.com/p/chromium/issues/detail?id=23571) if (!plugin_visible_windows_set_.empty()) { - SetSystemUIMode(kUIModeNormal, 0); + SystemUIMode mode; + SystemUIOptions options; + GetSystemUIMode(&mode, &options); + if (mode != kUIModeNormal) + SetSystemUIMode(kUIModeNormal, 0); } #endif } diff --git a/chrome/browser/plugin_process_host_mac.cc b/chrome/browser/plugin_process_host_mac.cc index d222880..65ead0a 100644 --- a/chrome/browser/plugin_process_host_mac.cc +++ b/chrome/browser/plugin_process_host_mac.cc @@ -34,7 +34,11 @@ void PluginProcessHost::OnPluginShowWindow(uint32 window_id, void PluginProcessHost::OnPluginHideWindow(uint32 window_id, gfx::Rect window_rect) { plugin_visible_windows_set_.erase(window_id); - SetSystemUIMode(kUIModeNormal, 0); + SystemUIMode mode; + SystemUIOptions options; + GetSystemUIMode(&mode, &options); + if (mode != kUIModeNormal) + SetSystemUIMode(kUIModeNormal, 0); } void PluginProcessHost::OnPluginDisposeWindow(uint32 window_id, |