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

Issue 10204014: views: Make sure the bubble-delegate removes itself from the anchor-widget's observer list. (Closed)

Created:
8 years, 8 months ago by sadrul
Modified:
8 years, 8 months ago
Reviewers:
msw, sky
CC:
chromium-reviews, msw+watch_chromium.org, alicet1, ben+watch_chromium.org, tfarina
Visibility:
Public.

Description

views: Make sure the bubble-delegate removes itself from the anchor-widget's observer list. This fixes a crash that shows up when terminating from the system tray popup. BUG=105151, 124310 TEST=WidgetObserverTest.DestroyBubble Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=133748

Patch Set 1 #

Total comments: 4

Patch Set 2 : . #

Total comments: 5

Patch Set 3 : . #

Total comments: 2

Patch Set 4 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -0 lines) Patch
M ui/views/bubble/bubble_delegate.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/bubble/bubble_delegate.cc View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M ui/views/widget/widget_unittest.cc View 2 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
sadrul
8 years, 8 months ago (2012-04-24 10:25:58 UTC) #1
msw
Is the repro as simple as that? can I see more info (bug# or just ...
8 years, 8 months ago (2012-04-24 14:49:06 UTC) #2
sadrul
The repro is indeed as simple as that. The test case without the change in ...
8 years, 8 months ago (2012-04-24 15:15:53 UTC) #3
msw
Sorry about the crash; I thought I specifically tested that. http://codereview.chromium.org/10204014/diff/1/ui/views/bubble/bubble_delegate.cc File ui/views/bubble/bubble_delegate.cc (right): http://codereview.chromium.org/10204014/diff/1/ui/views/bubble/bubble_delegate.cc#newcode143 ...
8 years, 8 months ago (2012-04-24 17:01:43 UTC) #4
sadrul
http://codereview.chromium.org/10204014/diff/1/ui/views/bubble/bubble_delegate.cc File ui/views/bubble/bubble_delegate.cc (right): http://codereview.chromium.org/10204014/diff/1/ui/views/bubble/bubble_delegate.cc#newcode143 ui/views/bubble/bubble_delegate.cc:143: anchor_widget_->RemoveObserver(this); On 2012/04/24 17:01:43, msw wrote: > On 2012/04/24 ...
8 years, 8 months ago (2012-04-24 18:00:48 UTC) #5
msw
Ah, this crash makes sense, CloseNow would crash because it doesn't hide the bubble first ...
8 years, 8 months ago (2012-04-24 18:10:41 UTC) #6
sadrul
http://codereview.chromium.org/10204014/diff/9001/ui/views/bubble/bubble_delegate.cc File ui/views/bubble/bubble_delegate.cc (right): http://codereview.chromium.org/10204014/diff/9001/ui/views/bubble/bubble_delegate.cc#newcode167 ui/views/bubble/bubble_delegate.cc:167: if (anchor_widget_) { On 2012/04/24 18:10:41, msw wrote: > ...
8 years, 8 months ago (2012-04-24 18:15:42 UTC) #7
msw
LGTM; thanks for fixing this! http://codereview.chromium.org/10204014/diff/9001/ui/views/bubble/bubble_delegate.cc File ui/views/bubble/bubble_delegate.cc (right): http://codereview.chromium.org/10204014/diff/9001/ui/views/bubble/bubble_delegate.cc#newcode167 ui/views/bubble/bubble_delegate.cc:167: if (anchor_widget_) { On ...
8 years, 8 months ago (2012-04-24 18:24:58 UTC) #8
msw
Oh, please set BUG=105151,124310
8 years, 8 months ago (2012-04-24 18:26:36 UTC) #9
sky
LGTM http://codereview.chromium.org/10204014/diff/12002/ui/views/bubble/bubble_delegate.cc File ui/views/bubble/bubble_delegate.cc (right): http://codereview.chromium.org/10204014/diff/12002/ui/views/bubble/bubble_delegate.cc#newcode166 ui/views/bubble/bubble_delegate.cc:166: void BubbleDelegateView::WindowClosing() { Make position match header.
8 years, 8 months ago (2012-04-24 19:41:44 UTC) #10
sadrul
8 years, 8 months ago (2012-04-24 19:47:54 UTC) #11
http://codereview.chromium.org/10204014/diff/12002/ui/views/bubble/bubble_del...
File ui/views/bubble/bubble_delegate.cc (right):

http://codereview.chromium.org/10204014/diff/12002/ui/views/bubble/bubble_del...
ui/views/bubble/bubble_delegate.cc:166: void BubbleDelegateView::WindowClosing()
{
On 2012/04/24 19:41:44, sky wrote:
> Make position match header.

Done.

Powered by Google App Engine
This is Rietveld 408576698