Commit b9e37058 authored by jochen@chromium.org's avatar jochen@chromium.org

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
parent 2cd768bd
...@@ -107,6 +107,8 @@ void PluginPlaceholder::ReplacePlugin(WebPlugin* new_plugin) { ...@@ -107,6 +107,8 @@ void PluginPlaceholder::ReplacePlugin(WebPlugin* new_plugin) {
void PluginPlaceholder::HidePlugin() { void PluginPlaceholder::HidePlugin() {
hidden_ = true; hidden_ = true;
if (!plugin_)
return;
WebPluginContainer* container = plugin_->container(); WebPluginContainer* container = plugin_->container();
WebElement element = container->element(); WebElement element = container->element();
element.setAttribute("style", "display: none;"); element.setAttribute("style", "display: none;");
...@@ -158,6 +160,8 @@ void PluginPlaceholder::SetMessage(const base::string16& message) { ...@@ -158,6 +160,8 @@ void PluginPlaceholder::SetMessage(const base::string16& message) {
} }
void PluginPlaceholder::UpdateMessage() { void PluginPlaceholder::UpdateMessage() {
if (!plugin_)
return;
std::string script = std::string script =
"window.setMessage(" + base::GetQuotedJSONString(message_) + ")"; "window.setMessage(" + base::GetQuotedJSONString(message_) + ")";
plugin_->web_view()->mainFrame()->executeScript( plugin_->web_view()->mainFrame()->executeScript(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment