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

Unified Diff: chrome/browser/cocoa/extensions/browser_actions_controller.mm

Issue 508010: [Mac] Fixes a bug where an ExtensionPopupController object's pointer was neve... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698