diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 23:43:56 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 23:43:56 +0000 |
commit | 045da4b8068f9d9c8d890f4e7c754b7b7ddf5ad5 (patch) | |
tree | 572ee208106483ea267071cc0192ac83032bf8c7 /chrome/browser/views/toolbar_view.h | |
parent | 539b67438f61dbd5512c5461eeeb30d231d57677 (diff) | |
download | chromium_src-045da4b8068f9d9c8d890f4e7c754b7b7ddf5ad5.zip chromium_src-045da4b8068f9d9c8d890f4e7c754b7b7ddf5ad5.tar.gz chromium_src-045da4b8068f9d9c8d890f4e7c754b7b7ddf5ad5.tar.bz2 |
Fixes possible crash if the window hosting a menu was closed while the
menu was showing. When this happens the window the menu creates is
implicitly destroyed (because the parent is going away).
BUG=none
TEST=Use the test case in 25563, but instead of opening a bookmark
menu open either the page or wrench menus.
Review URL: http://codereview.chromium.org/1739002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45518 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/toolbar_view.h')
-rw-r--r-- | chrome/browser/views/toolbar_view.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/views/toolbar_view.h b/chrome/browser/views/toolbar_view.h index 6e45799..734da7f 100644 --- a/chrome/browser/views/toolbar_view.h +++ b/chrome/browser/views/toolbar_view.h @@ -225,6 +225,13 @@ class ToolbarView : public AccessibleToolbarView, // Used to post tasks to switch to the next/previous menu. ScopedRunnableMethodFactory<ToolbarView> method_factory_; + + // If non-null the destuctor sets this to true. This is set to a non-null + // while the menu is showing and used to detect if the menu was deleted while + // running. + bool* destroyed_flag_; + + DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); }; #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ |