summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 02:32:48 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 02:32:48 +0000
commitadf2e99747550815864231a651d81394e8c28f31 (patch)
tree2440bb430c300f5b22e263647ca53bcf320ceb02 /chrome/browser
parent8c47a4373b91f653cf1b9b5e5810b250fc740745 (diff)
downloadchromium_src-adf2e99747550815864231a651d81394e8c28f31.zip
chromium_src-adf2e99747550815864231a651d81394e8c28f31.tar.gz
chromium_src-adf2e99747550815864231a651d81394e8c28f31.tar.bz2
Fix memory problems.
Remove some dead code. Remove valgrind suppression which suppressed this error. BUG=http://crbug.com/26489 TEST=Mac valgrind bot stays green for ui_test BrowserEncodingTest.TestEncodingAliasMapping Review URL: http://codereview.chromium.org/355006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.mm12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm
index bdbe4ad..7100bbb 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller.mm
@@ -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];