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

Unified Diff: chrome/browser/cocoa/bookmark_bar_controller.mm

Issue 3150039: Merge 57399 - Try to fix top crasher.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 4 months 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
« no previous file with comments | « no previous file | chrome/browser/cocoa/bookmark_bar_folder_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | chrome/browser/cocoa/bookmark_bar_folder_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698