diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 22:43:05 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 22:43:05 +0000 |
commit | 84ae20cba3059760948ca5d1f313dc25c74b26d6 (patch) | |
tree | 390f0ab122a09f95f1e7e09b5d748d46e8ced745 /chrome | |
parent | c48b39ccc260e30b46681d6925b5f1cc72fd6313 (diff) | |
download | chromium_src-84ae20cba3059760948ca5d1f313dc25c74b26d6.zip chromium_src-84ae20cba3059760948ca5d1f313dc25c74b26d6.tar.gz chromium_src-84ae20cba3059760948ca5d1f313dc25c74b26d6.tar.bz2 |
Fixes crash on showing info bubble.
BUG=8854
TEST=see bug
Review URL: http://codereview.chromium.org/42302
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/views/info_bubble.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc index c4352c6..9e52842 100644 --- a/chrome/browser/views/info_bubble.cc +++ b/chrome/browser/views/info_bubble.cc @@ -93,12 +93,10 @@ void InfoBubble::Init(HWND parent_hwnd, const gfx::Rect& position_relative_to, views::View* content) { HWND owning_frame_hwnd = GetAncestor(parent_hwnd, GA_ROOTOWNER); - // We should always have a frame, but there was a bug elsewhere that - // made it possible for the frame to be NULL, so we have the check. If - // you hit this, file a bug. - DCHECK(BrowserView::GetBrowserViewForHWND(owning_frame_hwnd)); - parent_ = reinterpret_cast<views::Window*>(win_util::GetWindowUserData( - owning_frame_hwnd)); + BrowserView* browser_view = + BrowserView::GetBrowserViewForHWND(owning_frame_hwnd); + DCHECK(browser_view); + parent_ = browser_view->frame(); parent_->DisableInactiveRendering(); if (kInfoBubbleCornerTopLeft == NULL) { |