diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-06 19:07:39 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-06 19:07:39 +0000 |
commit | c2f79c13a2f974e9f5eedf5bf813923534290b37 (patch) | |
tree | 233a5ad9424c73772a570097265b27b345addaa4 | |
parent | 2ecdbe82208706210d92fcf3529bba7d05b90f57 (diff) | |
download | chromium_src-c2f79c13a2f974e9f5eedf5bf813923534290b37.zip chromium_src-c2f79c13a2f974e9f5eedf5bf813923534290b37.tar.gz chromium_src-c2f79c13a2f974e9f5eedf5bf813923534290b37.tar.bz2 |
Return early in PluginPlaceholder::PluginListChanged if the frame is NULL.
BUG=125969
TEST=no crash
Review URL: http://codereview.chromium.org/10380024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135600 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/plugins/plugin_placeholder.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/renderer/plugins/plugin_placeholder.cc b/chrome/renderer/plugins/plugin_placeholder.cc index 181f3c4..d8ba707 100644 --- a/chrome/renderer/plugins/plugin_placeholder.cc +++ b/chrome/renderer/plugins/plugin_placeholder.cc @@ -117,7 +117,6 @@ PluginPlaceholder* PluginPlaceholder::CreateErrorPlugin( // |missing_plugin| will destroy itself when its WebViewPlugin is going away. PluginPlaceholder* plugin = new PluginPlaceholder( render_view, NULL, params, html_data, params.mimeType); - plugin->set_allow_loading(true); return plugin; } @@ -371,14 +370,16 @@ void PluginPlaceholder::OnCancelledDownloadingPlugin() { #endif // defined(ENABLE_PLUGIN_INSTALLATION) void PluginPlaceholder::PluginListChanged() { - ChromeViewHostMsg_GetPluginInfo_Status status; - webkit::WebPluginInfo plugin_info; - std::string mime_type(plugin_params_.mimeType.utf8()); - std::string actual_mime_type; + if (!frame_) + return; WebDocument document = frame_->top()->document(); if (document.isNull()) return; + ChromeViewHostMsg_GetPluginInfo_Status status; + webkit::WebPluginInfo plugin_info; + std::string mime_type(plugin_params_.mimeType.utf8()); + std::string actual_mime_type; render_view()->Send(new ChromeViewHostMsg_GetPluginInfo( routing_id(), GURL(plugin_params_.url), document.url(), mime_type, &status, &plugin_info, &actual_mime_type)); |