Chromium Code Reviews| Index: chrome/browser/plugins/plugin_infobar_delegates.cc |
| diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc |
| index 78607fcc76c10c4fb47e6d06fb485c031c309341..1a8f7c5b33bbd5265f10ac4721dbc6cefa481377 100644 |
| --- a/chrome/browser/plugins/plugin_infobar_delegates.cc |
| +++ b/chrome/browser/plugins/plugin_infobar_delegates.cc |
| @@ -233,15 +233,16 @@ bool OutdatedPluginInfoBarDelegate::Accept() { |
| } |
| content::WebContents* web_contents = owner()->GetWebContents(); |
| + // A call to any of |OpenDownloadURL()| or |StartInstalling()| will |
| + // result in killing ourselves. Accordingly, we make sure to |
|
Bernhard Bauer
2012/10/05 14:22:45
Nit: let's say "deleting" instead of "killing".
|
| + // not pass a reference to an object that can go away. |
| + // http://crbug.com/54167 |
| + GURL plugin_url(plugin_metadata_->plugin_url()); |
| if (plugin_metadata_->url_for_display()) { |
| - installer()->OpenDownloadURL(plugin_metadata_->url_for_display(), |
| - plugin_metadata_->plugin_url(), |
| - web_contents); |
| + installer()->OpenDownloadURL(plugin_url, web_contents); |
| } else { |
| - installer()->StartInstalling( |
| - plugin_metadata_->url_for_display(), |
| - plugin_metadata_->plugin_url(), |
| - TabContents::FromWebContents(web_contents)); |
| + installer()->StartInstalling(plugin_url, |
| + TabContents::FromWebContents(web_contents)); |
| } |
| return false; |
| } |