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

Issue 508010: [Mac] Fixes a bug where an ExtensionPopupController object's pointer was neve... (Closed)

Created:
11 years ago by Bons
Modified:
9 years, 5 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews_googlegroups.com, John Grabowski, Erik does not do reviews, ben+cc_chromium.org, pam+watch_chromium.org, Aaron Boodman
Visibility:
Public.

Description

[Mac] Fixes a bug where an ExtensionPopupController object's pointer was never being nil'd out when it resigned its key state, leading to a obj_msgSend from a dirty pointer. Also makes sure that other areas of Page Action code are properly using nil instead of NULL where necessary. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35109

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -10 lines) Patch
M chrome/browser/cocoa/extensions/browser_actions_controller.mm View 2 chunks +6 lines, -2 lines 4 comments Download
M chrome/browser/cocoa/extensions/extension_popup_controller.mm View 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/cocoa/location_bar_view_mac.h View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/cocoa/location_bar_view_mac.mm View 4 chunks +8 lines, -6 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Bons
11 years ago (2009-12-21 20:46:24 UTC) #1
Mark Mentovai
LGTM ho ho ho http://codereview.chromium.org/508010/diff/1/3 File chrome/browser/cocoa/extensions/browser_actions_controller.mm (right): http://codereview.chromium.org/508010/diff/1/3#newcode286 chrome/browser/cocoa/extensions/browser_actions_controller.mm:286: if (popup == nil || ...
11 years ago (2009-12-21 20:54:32 UTC) #2
Bons
11 years ago (2009-12-21 21:01:41 UTC) #3
http://codereview.chromium.org/508010/diff/1/3
File chrome/browser/cocoa/extensions/browser_actions_controller.mm (right):

http://codereview.chromium.org/508010/diff/1/3#newcode286
chrome/browser/cocoa/extensions/browser_actions_controller.mm:286: if (popup ==
nil || Details<ExtensionHost>([popup host]) != details)
On 2009/12/21 20:54:32, Mark Mentovai wrote:
> Things are sometimes a tiny bit easier to follow if early returns aren't
> sprinkled throughout functions.   Maybe you should ! this condition and put
> [owner_ hidePopup] inside the controlled block, and get rid of the early
return.

Done.

http://codereview.chromium.org/508010/diff/1/3#newcode322
chrome/browser/cocoa/extensions/browser_actions_controller.mm:322:
popupController_ = nil;
On 2009/12/21 20:54:32, Mark Mentovai wrote:
> Not strictly necessary, because -alloc zero-fills the entire object.  I guess
> you can leave this in if you like being explicit, but it's customary not to
set
> things to nil in -init methods.

Done.

http://codereview.chromium.org/508010/diff/1/5
File chrome/browser/cocoa/location_bar_view_mac.mm (right):

http://codereview.chromium.org/508010/diff/1/5#newcode627
chrome/browser/cocoa/location_bar_view_mac.mm:627: if (popup_controller_ == nil
||
On 2009/12/21 20:54:32, Mark Mentovai wrote:
> Same comment about early returns applies here.

Done.

Powered by Google App Engine
This is Rietveld 408576698