| Index: chrome/browser/cocoa/bookmark_bar_controller.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/bookmark_bar_controller.mm (revision 57426)
|
| +++ chrome/browser/cocoa/bookmark_bar_controller.mm (working copy)
|
| @@ -1371,6 +1371,7 @@
|
| if (NSMaxX([button frame]) < maxViewX)
|
| break;
|
| [buttons_ removeLastObject];
|
| + [button setDelegate:nil];
|
| [button removeFromSuperview];
|
| --displayedButtonCount_;
|
| }
|
| @@ -1438,7 +1439,10 @@
|
| // Delete all buttons (bookmarks, chevron, "other bookmarks") from the
|
| // bookmark bar; reset knowledge of bookmarks.
|
| - (void)clearBookmarkBar {
|
| - [buttons_ makeObjectsPerformSelector:@selector(removeFromSuperview)];
|
| + for (BookmarkButton* button in buttons_.get()) {
|
| + [button setDelegate:nil];
|
| + [button removeFromSuperview];
|
| + }
|
| [buttons_ removeAllObjects];
|
| [self clearMenuTagMap];
|
| displayedButtonCount_ = 0;
|
| @@ -2377,6 +2381,7 @@
|
| poofPoint = [oldButton convertPoint:poofPoint toView:nil];
|
| poofPoint = [[oldButton window] convertBaseToScreen:poofPoint];
|
| NSRect oldFrame = [oldButton frame];
|
| + [oldButton setDelegate:nil];
|
| [oldButton removeFromSuperview];
|
| if (animate && !ignoreAnimations_ && [self isVisible])
|
| NSShowAnimationEffect(NSAnimationEffectDisappearingItemDefault, poofPoint,
|
|
|