Chromium Code Reviews| Index: chrome/browser/cocoa/extensions/browser_actions_controller.mm |
| =================================================================== |
| --- chrome/browser/cocoa/extensions/browser_actions_controller.mm (revision 35091) |
| +++ chrome/browser/cocoa/extensions/browser_actions_controller.mm (working copy) |
| @@ -281,11 +281,14 @@ |
| [owner_ browserActionVisibilityHasChanged]; |
| break; |
| } |
| - case NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE: |
| - if (Details<ExtensionHost>([[owner_ popup] host]) != details) |
| + case NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE: { |
| + ExtensionPopupController* popup = [owner_ popup]; |
| + if (popup == nil || Details<ExtensionHost>([popup host]) != details) |
|
Mark Mentovai
2009/12/21 20:54:32
Things are sometimes a tiny bit easier to follow i
Bons
2009/12/21 21:01:41
Done.
|
| return; |
| + |
| [owner_ hidePopup]; |
| break; |
| + } |
| default: |
| NOTREACHED() << L"Unexpected notification"; |
| } |
| @@ -316,6 +319,7 @@ |
| observer_.reset(new ExtensionsServiceObserverBridge(self, profile_)); |
| buttons_.reset([[NSMutableDictionary alloc] init]); |
| buttonOrder_.reset([[NSMutableArray alloc] init]); |
| + popupController_ = nil; |
|
Mark Mentovai
2009/12/21 20:54:32
Not strictly necessary, because -alloc zero-fills
Bons
2009/12/21 21:01:41
Done.
|
| } |
| return self; |