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

Unified Diff: chrome/browser/plugins/plugin_infobar_delegates.cc

Issue 11032052: Merge 160403 - Fix crash when a download is requested for an outdated plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1287/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_installer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_infobar_delegates.cc
===================================================================
--- chrome/browser/plugins/plugin_infobar_delegates.cc (revision 160406)
+++ chrome/browser/plugins/plugin_infobar_delegates.cc (working copy)
@@ -233,15 +233,16 @@
}
content::WebContents* web_contents = owner()->GetWebContents();
+ // A call to any of |OpenDownloadURL()| or |StartInstalling()| will
+ // result in deleting ourselves. Accordingly, we make sure to
+ // 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;
}
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698