Index: Source/core/html/HTMLPlugInElement.cpp |
diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp |
index 92f848045731df1a2697ca41d9ec4eea1309df66..7efed677a229d8b4254cc5e6c0591b51667aaf0b 100644 |
--- a/Source/core/html/HTMLPlugInElement.cpp |
+++ b/Source/core/html/HTMLPlugInElement.cpp |
@@ -78,6 +78,11 @@ HTMLPlugInElement::~HTMLPlugInElement() |
ASSERT(!m_pluginWrapper); // cleared in detach() |
ASSERT(!m_isDelayingLoadEvent); |
+#if ENABLE(OILPAN) |
+ if (m_persistedPluginWidget) |
+ HTMLFrameOwnerElement::disposeWidget(m_persistedPluginWidget.get()); |
haraken
2014/09/29 14:16:36
Can't we call HTMLFrameOwnerElement::disposeWidget
sof
2014/10/07 13:27:32
That the plugin element isn't in the tree to start
|
+#endif |
+ |
if (m_NPObject) { |
_NPN_ReleaseObject(m_NPObject); |
m_NPObject = 0; |
@@ -87,9 +92,19 @@ HTMLPlugInElement::~HTMLPlugInElement() |
void HTMLPlugInElement::trace(Visitor* visitor) |
{ |
visitor->trace(m_imageLoader); |
+ visitor->trace(m_persistedPluginWidget); |
HTMLFrameOwnerElement::trace(visitor); |
} |
+#if ENABLE(OILPAN) |
+void HTMLPlugInElement::disconnectContentFrame() |
+{ |
+ if (m_persistedPluginWidget) |
+ HTMLFrameOwnerElement::disposeWidget(m_persistedPluginWidget.get()); |
+ HTMLFrameOwnerElement::disconnectContentFrame(); |
+} |
+#endif |
+ |
bool HTMLPlugInElement::canProcessDrag() const |
{ |
return pluginWidget() && pluginWidget()->isPluginView() && toPluginView(pluginWidget())->canProcessDrag(); |
@@ -343,7 +358,7 @@ void HTMLPlugInElement::defaultEventHandler(Event* event) |
if (toRenderEmbeddedObject(r)->showsUnavailablePluginIndicator()) |
return; |
} |
- RefPtr<Widget> widget = toRenderWidget(r)->widget(); |
+ RefPtrWillBeRawPtr<Widget> widget = toRenderWidget(r)->widget(); |
if (!widget) |
return; |
widget->handleEvent(event); |
@@ -483,7 +498,7 @@ bool HTMLPlugInElement::loadPlugin(const KURL& url, const String& mimeType, cons |
WTF_LOG(Plugins, " Loaded URL: %s", url.string().utf8().data()); |
m_loadedUrl = url; |
- RefPtr<Widget> widget = m_persistedPluginWidget; |
+ RefPtrWillBeRawPtr<Widget> widget = m_persistedPluginWidget; |
if (!widget) { |
bool loadManually = document().isPluginDocument() && !document().containsPlugins(); |
FrameLoaderClient::DetachedPluginPolicy policy = requireRenderer ? FrameLoaderClient::FailOnDetachedPlugin : FrameLoaderClient::AllowDetachedPlugin; |