Chromium Code Reviews| Index: chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm |
| diff --git a/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm b/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm |
| index 65932a292f83f10a7945ef1444a660c87c2343ea..ac071a1167869f0e456e005fc13f08f4758aaaed 100644 |
| --- a/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm |
| +++ b/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm |
| @@ -167,12 +167,15 @@ ValidationMessageBubbleCocoa::ValidationMessageBubbleCocoa( |
| subText:sub_text] retain]); |
| } |
| -ValidationMessageBubbleCocoa::~ValidationMessageBubbleCocoa() { |
| - [controller_ close]; |
| -} |
| +ValidationMessageBubbleCocoa::~ValidationMessageBubbleCocoa() {} |
| void ValidationMessageBubbleCocoa::SetPositionRelativeToAnchor( |
| content::RenderWidgetHost* widget_host, |
| const gfx::Rect& anchor_in_root_view) { |
| [controller_ setAnchorPoint:GetAnchorPoint(widget_host, anchor_in_root_view)]; |
| } |
| + |
| +ValidationMessageBubbleCococa::CloseValidationMessage() { |
| + [controller_ close]; |
| + delete this; |
|
groby-ooo-7-16
2016/04/13 01:42:31
I'm not a fan of self-deletion. Do we have to?
Evan Stade
2016/04/13 15:39:19
I had to make it a WeakPtr (bubble is self-owning)
groby-ooo-7-16
2016/04/13 21:05:56
No, [self autorelease] is an Objective C thing. I
|
| +} |