Chromium Code Reviews| Index: chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm |
| diff --git a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm |
| index fa6d65f95eb8f30e4324317d593a1f0a81d7f58b..6ad973e3654b7a1341d01fb8ec480b14a4b9666c 100644 |
| --- a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm |
| +++ b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm |
| @@ -81,8 +81,10 @@ const int kMessageTextMaxSlots = 2000; |
| } |
| - (NSAlert*)alert { |
| - if (!alert_) |
| + if (!alert_) { |
| alert_.reset([[NSAlert alloc] init]); |
| + [alert_ setIcon:[NSImage new]]; |
|
meacer
2016/02/04 22:17:58
Not sure about the ownership here, does alert own
droger
2016/02/05 10:33:01
Drive-by.
I expect this to be a memory leak.
Does
Avi (use Gerrit)
2016/02/05 17:06:09
It'll make its own reference, so you're leaking he
Avi (use Gerrit)
2016/02/05 17:11:23
Gah, yes. I replied but forgot to mail my comments
meacer
2016/02/05 19:37:16
Done, thanks for the snippet.
|
| + } |
| return alert_; |
| } |