summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-09 11:51:37 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-09 11:51:37 +0000
commitb9e37058e910316f53cbfb9bb664cd3509276934 (patch)
tree41108f283169c05eeb5f46e7b7f7af2c8a0da0d8 /components
parent2cd768bd7229500e9b2fe025d487e938673124e0 (diff)
downloadchromium_src-b9e37058e910316f53cbfb9bb664cd3509276934.zip
chromium_src-b9e37058e910316f53cbfb9bb664cd3509276934.tar.gz
chromium_src-b9e37058e910316f53cbfb9bb664cd3509276934.tar.bz2
Don't try to access the plugin_ after we deleted in the in plugin placeholder
BUG=332675 R=bauerb@chromium.org,inferno@chromium.org Review URL: https://codereview.chromium.org/131073002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/plugins/renderer/plugin_placeholder.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/plugins/renderer/plugin_placeholder.cc b/components/plugins/renderer/plugin_placeholder.cc
index 343c7ad..f99ee48 100644
--- a/components/plugins/renderer/plugin_placeholder.cc
+++ b/components/plugins/renderer/plugin_placeholder.cc
@@ -107,6 +107,8 @@ void PluginPlaceholder::ReplacePlugin(WebPlugin* new_plugin) {
void PluginPlaceholder::HidePlugin() {
hidden_ = true;
+ if (!plugin_)
+ return;
WebPluginContainer* container = plugin_->container();
WebElement element = container->element();
element.setAttribute("style", "display: none;");
@@ -158,6 +160,8 @@ void PluginPlaceholder::SetMessage(const base::string16& message) {
}
void PluginPlaceholder::UpdateMessage() {
+ if (!plugin_)
+ return;
std::string script =
"window.setMessage(" + base::GetQuotedJSONString(message_) + ")";
plugin_->web_view()->mainFrame()->executeScript(