Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Issue 7969024: Merge 101958 - Attempt at fixing crash in menus shown from infobars. Here's what the (Closed)

Created:
9 years, 3 months ago by sky
Modified:
9 years, 3 months ago
Reviewers:
sky
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, mihaip+watch_chromium.org
Visibility:
Public.

Description

Merge 101958 - Attempt at fixing crash in menus shown from infobars. Here's what the current code does when closing an infobar: . The animation ends, resulting in a delayed deletion of InfoBarView (InfoBarContainerView::PlatformSpecificRemoveInfoBar). . The InfoBarDelegate deletes itself (InfoBarDelegate::InfoBarClosed). . Eventually the InfoBarView is deleted. This leaves a window of time between which the view is alive, but the delegate has been deleted. The view doesn't directly reference the delegate anymore, but the menu models created by the infobarviews do. This means if a paint comes in to the menu it's going to query the deleted delegate and we crash. I made CancelMenu pure virtual in hopes of avoiding this in the future by making subclasses think about it. BUG=93314 TEST=make sure menus on infobars still work. R=pkasting@chromium.org Review URL: http://codereview.chromium.org/7796010 TBR=sky@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102375

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -66 lines) Patch
M chrome/browser/ui/views/infobars/after_translate_infobar.h View 3 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/infobars/after_translate_infobar.cc View 2 chunks +8 lines, -11 lines 0 comments Download
M chrome/browser/ui/views/infobars/before_translate_infobar.h View 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/infobars/before_translate_infobar.cc View 2 chunks +7 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/infobars/confirm_infobar.h View 1 chunk +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/infobars/extension_infobar.h View 3 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/infobars/extension_infobar.cc View 2 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_view.h View 4 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_view.cc View 3 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/infobars/link_infobar.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/infobars/translate_message_infobar.h View 1 chunk +7 lines, -4 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
sky
9 years, 3 months ago (2011-09-22 21:39:08 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698