Chromium Code Reviews| Index: chrome/browser/cocoa/history_menu_bridge.h |
| diff --git a/chrome/browser/cocoa/history_menu_bridge.h b/chrome/browser/cocoa/history_menu_bridge.h |
| index ef84031876ffeae739fc29cf1dbf2577c9e74c87..b02b75a18f78ee30ccc1bad43e918a220a80e9e3 100644 |
| --- a/chrome/browser/cocoa/history_menu_bridge.h |
| +++ b/chrome/browser/cocoa/history_menu_bridge.h |
| @@ -88,8 +88,12 @@ class HistoryMenuBridge : public NotificationObserver, |
| // The Handle given to us by the FaviconService for the icon fetch request. |
| FaviconService::Handle icon_handle; |
| - // The pointer to the item after it has been created. Weak. |
| - NSMenuItem* menu_item; |
| + // The pointer to the item after it has been created. This is co-owned with |
| + // the NSMenu, but during a rebuild flood (if the user closes a lot of tabs |
|
John Grabowski
2010/06/17 19:30:44
This is co-owned with the NSMenu. but ...
-->
Str
|
| + // quickly), the NSMenu can release the item before the HistoryItem has |
| + // been fully deleted. If this were a weak pointer, it would result in a |
| + // zombie. |
| + scoped_nsobject<NSMenuItem> menu_item; |
| // This ID is unique for a browser session and can be passed to the |
| // TabRestoreService to re-open the closed window or tab that this |