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

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

Issue 355006: Fix memory problems.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | tools/valgrind/memcheck/suppressions_mac.txt » ('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 30770)
+++ chrome/browser/cocoa/bookmark_bar_controller.mm (working copy)
@@ -139,9 +139,11 @@
// Position the off-the-side chevron to the left of the otherBookmarks button.
- (void)positionOffTheSideButton {
NSRect frame = [offTheSideButton_ frame];
- frame.origin.x = ([otherBookmarksButton_ frame].origin.x -
- (frame.size.width + bookmarks::kBookmarkHorizontalPadding));
- [offTheSideButton_ setFrame:frame];
+ if (otherBookmarksButton_.get()) {
+ frame.origin.x = ([otherBookmarksButton_ frame].origin.x -
+ (frame.size.width + bookmarks::kBookmarkHorizontalPadding));
+ [offTheSideButton_ setFrame:frame];
+ }
}
// Check if we should enable or disable the off-the-side chevron.
@@ -804,9 +806,7 @@
[buttonView_ addSubview:button];
// Now that it's here, move the chevron over.
- NSRect oframe = [offTheSideButton_ frame];
- oframe.origin.x = frame.origin.x - (oframe.size.width +
- bookmarks::kBookmarkHorizontalPadding);
+ [self positionOffTheSideButton];
// Force it to be the right size, right now.
[self resizeButtons];
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions_mac.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698