diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-04 14:43:14 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-04 14:43:14 +0000 |
commit | 9c6e36af2bf2c218db55b338a4c1698ace036210 (patch) | |
tree | e9b3020d02151aaca904ee8926e4aea9a52508c7 | |
parent | 813ac45068723f58d7a47628fc698a6021727964 (diff) | |
download | chromium_src-9c6e36af2bf2c218db55b338a4c1698ace036210.zip chromium_src-9c6e36af2bf2c218db55b338a4c1698ace036210.tar.gz chromium_src-9c6e36af2bf2c218db55b338a4c1698ace036210.tar.bz2 |
Return early in PluginPlaceholder::PluginListChanged if the top-level document is NULL.
BUG=125969
TEST=
Review URL: http://codereview.chromium.org/10321005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135340 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/plugins/plugin_placeholder.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/renderer/plugins/plugin_placeholder.cc b/chrome/renderer/plugins/plugin_placeholder.cc index 595bb98..ddd752d 100644 --- a/chrome/renderer/plugins/plugin_placeholder.cc +++ b/chrome/renderer/plugins/plugin_placeholder.cc @@ -46,6 +46,7 @@ using content::RenderThread; using content::RenderView; using WebKit::WebContextMenuData; +using WebKit::WebDocument; using WebKit::WebElement; using WebKit::WebFrame; using WebKit::WebMenuItemInfo; @@ -361,8 +362,12 @@ void PluginPlaceholder::PluginListChanged() { webkit::WebPluginInfo plugin_info; std::string mime_type(plugin_params_.mimeType.utf8()); std::string actual_mime_type; + WebDocument document = frame_->top()->document(); + if (document.isNull()) + return; + render_view()->Send(new ChromeViewHostMsg_GetPluginInfo( - routing_id(), GURL(plugin_params_.url), frame_->top()->document().url(), + routing_id(), GURL(plugin_params_.url), document.url(), mime_type, &status, &plugin_info, &actual_mime_type)); if (status.value == status_->value) return; |