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

Issue 7876004: [Mac] Break stale controller refs in infobar close. (Closed)

Created:
9 years, 3 months ago by Scott Hess - ex-Googler
Modified:
9 years, 3 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

[Mac] Break stale controller refs in infobar close. Infobars can be closed due to a navigation while the user is manipulating controls on the infobar. This can result in Objective-C messages to a deallocated controller. If the controller is still live, the action could attempt to dereference a NULL delegate. This attempts to knock down both cases. BUG=94639, 92381 TEST=See bug, and monitor crash server. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=100874

Patch Set 1 #

Patch Set 2 : Also fix target on the close button. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -16 lines) Patch
M chrome/browser/ui/cocoa/infobars/infobar_controller.mm View 1 5 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/translate/before_translate_infobar_controller.mm View 2 chunks +12 lines, -2 lines 1 comment Download
M chrome/browser/ui/cocoa/translate/translate_infobar_base.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/translate/translate_infobar_base.mm View 5 chunks +51 lines, -13 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Scott Hess - ex-Googler
This might also fix http://crbug.com/92381 , or may be trivially adaptable to fix that, I'll ...
9 years, 3 months ago (2011-09-12 21:43:13 UTC) #1
Robert Sesek
lgtm
9 years, 3 months ago (2011-09-12 21:52:49 UTC) #2
Scott Hess - ex-Googler
On 2011/09/12 21:52:49, rsesek wrote: > lgtm Trivial change to handle breaking the link for ...
9 years, 3 months ago (2011-09-13 01:00:41 UTC) #3
commit-bot: I haz the power
Change committed as 100874
9 years, 3 months ago (2011-09-13 06:00:50 UTC) #4
Nico
9 years, 3 months ago (2011-09-13 06:25:37 UTC) #5
http://codereview.chromium.org/7876004/diff/3001/chrome/browser/ui/cocoa/tran...
File chrome/browser/ui/cocoa/translate/before_translate_infobar_controller.mm
(right):

http://codereview.chromium.org/7876004/diff/3001/chrome/browser/ui/cocoa/tran...
chrome/browser/ui/cocoa/translate/before_translate_infobar_controller.mm:111:
[self delegate]->NeverTranslatePageLanguage();
Nit: s/[self delegate]/delegate/

Powered by Google App Engine
This is Rietveld 408576698