| Index: components/plugins/renderer/plugin_placeholder.cc
|
| diff --git a/components/plugins/renderer/plugin_placeholder.cc b/components/plugins/renderer/plugin_placeholder.cc
|
| index 343c7ad1614d011fed492ac95b5327f4129cc6ab..f99ee489fb6de122f4533dfe261fc63e682ab083 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(
|
|
|