| Index: Source/web/WebPluginContainerImpl.cpp
|
| diff --git a/Source/web/WebPluginContainerImpl.cpp b/Source/web/WebPluginContainerImpl.cpp
|
| index 6196f7769f4d8f07eb1aaa7f0712a0751f822b2f..8ec7ca5205cc8375c766985d4722f1946bcfa66f 100644
|
| --- a/Source/web/WebPluginContainerImpl.cpp
|
| +++ b/Source/web/WebPluginContainerImpl.cpp
|
| @@ -244,7 +244,8 @@ void WebPluginContainerImpl::setParentVisible(bool parentVisible)
|
| if (!isSelfVisible())
|
| return; // This widget has explicitely been marked as not visible.
|
|
|
| - m_webPlugin->updateVisibility(isVisible());
|
| + if (m_webPlugin)
|
| + m_webPlugin->updateVisibility(isVisible());
|
| }
|
|
|
| void WebPluginContainerImpl::setParent(Widget* widget)
|
| @@ -710,11 +711,14 @@ void WebPluginContainerImpl::dispose()
|
| for (size_t i = 0; i < m_pluginLoadObservers.size(); ++i)
|
| m_pluginLoadObservers[i]->clearPluginContainer();
|
|
|
| - m_webPlugin->destroy();
|
| + if (m_webPlugin)
|
| + m_webPlugin->destroy();
|
| m_webPlugin = nullptr;
|
|
|
| - if (m_webLayer)
|
| + if (m_webLayer) {
|
| GraphicsLayer::unregisterContentsLayer(m_webLayer);
|
| + m_webLayer = nullptr;
|
| + }
|
|
|
| m_pluginLoadObservers.clear();
|
| m_element = nullptr;
|
| @@ -953,9 +957,4 @@ void WebPluginContainerImpl::calculateGeometry(IntRect& windowRect, IntRect& cli
|
| cutOutRects[i].move(-frameRect().x(), -frameRect().y());
|
| }
|
|
|
| -bool WebPluginContainerImpl::pluginShouldPersist() const
|
| -{
|
| - return m_webPlugin->shouldPersist();
|
| -}
|
| -
|
| } // namespace blink
|
|
|