summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_controller.mm
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-19 19:08:53 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-19 19:08:53 +0000
commite980eb3d8744040ae3e8c5252c8d62ef90da40c3 (patch)
tree49b6927690f15dd212905947457a05e6da6d8ab8 /chrome/browser/cocoa/bookmark_bar_controller.mm
parent5295d1499e94681d310637994a57403b0875162a (diff)
downloadchromium_src-e980eb3d8744040ae3e8c5252c8d62ef90da40c3.zip
chromium_src-e980eb3d8744040ae3e8c5252c8d62ef90da40c3.tar.gz
chromium_src-e980eb3d8744040ae3e8c5252c8d62ef90da40c3.tar.bz2
Another bookmark sync issue.
If deleting a bookmark button (due to sync) while a bookmark folder is open, be sure to close the folder. Surprisingly this is among the top browser crashes. BUG=37782 Review URL: http://codereview.chromium.org/2113014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47699 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm
index bb9aaca..e6efc8c 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller.mm
@@ -2245,6 +2245,10 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
if (buttonIndex < (NSInteger)[buttons_ count]) {
// The button being removed is showing in the bar.
BookmarkButton* oldButton = [buttons_ objectAtIndex:buttonIndex];
+ if (oldButton == [folderController_ parentButton]) {
+ // If we are deleting a button whose folder is currently open, close it!
+ [self closeAllBookmarkFolders];
+ }
NSRect poofFrame = [oldButton bounds];
NSPoint poofPoint = NSMakePoint(NSMidX(poofFrame), NSMidY(poofFrame));
poofPoint = [oldButton convertPoint:poofPoint toView:nil];